Skip to content

Commit 2c50f14

Browse files
committed
Fixed #107 moved Java final keyword check before substitution contains
1 parent aa114c3 commit 2c50f14

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

BEXCodeComparePlugin/src/info/codesaway/bex/compare/RangeComparatorBEX.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ private void computeDifferences(final SubMonitor newChild, final boolean updateV
129129

130130
if (shouldUseEnhancedCompare) {
131131
// Look first for common refactorings, so can group changes together
132-
DiffHelper.handleSubstitution(diff, normalizationFunction, JAVA_SEMICOLON, SUBSTITUTION_CONTAINS,
133-
new EnhancedForLoopRefactoring(), IMPORT_SAME_CLASSNAME_DIFFERENT_PACKAGE, JAVA_UNBOXING, JAVA_CAST,
134-
// TODO: think need to move Final check earlier (since noticed didn't pick up as Final was difference (not important)
135-
JAVA_FINAL_KEYWORD, JAVA_DIAMOND_OPERATOR,
136-
SubstitutionType.LCS_MAX_OPERATOR);
132+
// Issue #107 - moved JAVA_FINAL_KEYWORD before SUBSTITUTION_CONTAINS
133+
// so that adding / removing the final keyword is seen as a non-important change
134+
DiffHelper.handleSubstitution(diff, normalizationFunction, JAVA_SEMICOLON, JAVA_FINAL_KEYWORD,
135+
SUBSTITUTION_CONTAINS, new EnhancedForLoopRefactoring(), IMPORT_SAME_CLASSNAME_DIFFERENT_PACKAGE,
136+
JAVA_UNBOXING, JAVA_CAST, JAVA_DIAMOND_OPERATOR, SubstitutionType.LCS_MAX_OPERATOR);
137137
} else {
138138
DiffHelper.handleSubstitution(diff, normalizationFunction, SUBSTITUTION_CONTAINS,
139139
new EnhancedForLoopRefactoring(), IMPORT_SAME_CLASSNAME_DIFFERENT_PACKAGE,

0 commit comments

Comments
 (0)