Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Quick question about WorkingTreeIterator::contentCheck

I was just looking at the source for
org.eclipse.jgit.treewalk.WorkingTreeIterator (via the github mirror),
and I noticed something I thought was strange in function contentCheck
        if (mode == FileMode.SYMLINK.getBits()) {
            return !new File(readSymlinkTarget(current())).equals(
                    new File(readContentAsNormalizedString(entry, reader)));
The functions readSymlinkTarget and readContentAsNormalizedString both
return strings which are the contents of their respective files. But
the constructor should be taking a path name argument.
Have I understood correctly?
Is it right to construct File objects like this?

Back to the top