// compare objects (unreliable result is interpreted as positive match)
int comp = comparator.compare(g, left.get(i).getObject(), similarLeft.get(j).getObject(), true);
- if (comp >= 0 && comp < Integer.MAX_VALUE) {
+ if (comp >= 0 && comp < ResourceComparator.NO_MATCH) {
useL[i] = true;
useSL[j] = true;
break;
}
- private boolean hasMatchingPaths(Set<Path> leftPaths, Set<Path> rightPaths) {
+ private boolean hasMatchingPaths(Set<Path> leftPaths, Set<Path> rightPaths) throws DatabaseException {
if (leftPaths.size() != rightPaths.size())
return false;
BijectionMap<Path,Path> map = getMatchingPaths(leftPaths, rightPaths);
return map.size() == leftPaths.size();
}
- private BijectionMap<Path,Path> getMatchingPaths(Set<Path> leftPaths, Set<Path> rightPaths) {
+ private BijectionMap<Path,Path> getMatchingPaths(Set<Path> leftPaths, Set<Path> rightPaths) throws DatabaseException {
BijectionMap<Path,Path> map = new BijectionMap<Path, Path>();
for (Path leftPath : leftPaths) {
for (Path rightPath : rightPaths) {
match = false;
break;
}
+ if (comparator.compare(g, sl.getObject(), sr.getObject()) == ResourceComparator.NO_MATCH) {
+ match = false;
+ break;
+ }
}
if (match) {
map.map(leftPath, rightPath);