summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
28413fd)
gitlab #30
Change-Id: Ia27a64b42c2daafdcb888bca7dba546c4ca4ff06
// compare objects (unreliable result is interpreted as positive match)
int comp = comparator.compare(g, left.get(i).getObject(), similarLeft.get(j).getObject(), true);
// 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;
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();
}
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) {
BijectionMap<Path,Path> map = new BijectionMap<Path, Path>();
for (Path leftPath : leftPaths) {
for (Path rightPath : rightPaths) {
+ if (comparator.compare(g, sl.getObject(), sr.getObject()) == ResourceComparator.NO_MATCH) {
+ match = false;
+ break;
+ }
}
if (match) {
map.map(leftPath, rightPath);
}
if (match) {
map.map(leftPath, rightPath);