diff options
author | Dani Megert | 2010-10-25 14:42:47 +0000 |
---|---|---|
committer | Dani Megert | 2010-10-25 14:42:47 +0000 |
commit | 1d376a75375c21c5a32c1d93619e308c9cec8663 (patch) | |
tree | 5e57f44f605f85584f884efddfc86345f6810bdc /bundles/org.eclipse.compare | |
parent | ad70a0e96d9b83f9f7e78d9da1f3a72aff876cea (diff) | |
download | eclipse.platform.team-1d376a75375c21c5a32c1d93619e308c9cec8663.tar.gz eclipse.platform.team-1d376a75375c21c5a32c1d93619e308c9cec8663.tar.xz eclipse.platform.team-1d376a75375c21c5a32c1d93619e308c9cec8663.zip |
Removed unused variables.
Diffstat (limited to 'bundles/org.eclipse.compare')
-rw-r--r-- | bundles/org.eclipse.compare/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/Hunk.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/Hunk.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/Hunk.java index 88ab17be4..27ec848c6 100644 --- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/Hunk.java +++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/Hunk.java @@ -14,10 +14,11 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.List; +import org.eclipse.core.runtime.Assert; + import org.eclipse.compare.patch.IFilePatchResult; import org.eclipse.compare.patch.IHunk; import org.eclipse.compare.patch.PatchConfiguration; -import org.eclipse.core.runtime.Assert; /** * A Hunk describes a range of changed lines and some context lines. @@ -176,7 +177,6 @@ public class Hunk implements IHunk { public boolean tryPatch(PatchConfiguration configuration, List lines, int shift, int fuzz) { boolean reverse = configuration.isReversed(); int pos = getStart(reverse) + shift; - int deleteMatches = 0; List contextLines = new ArrayList(); boolean contextLinesMatched = true; boolean precedingLinesChecked = false; @@ -226,7 +226,6 @@ public class Hunk implements IHunk { if (pos < 0 || pos >= lines.size()) // out of the file return false; if (linesMatch(configuration, line, (String) lines.get(pos))) { - deleteMatches++; pos++; continue; // line matched, continue with the next one } @@ -234,10 +233,7 @@ public class Hunk implements IHunk { // We must remove all lines at once, return false if this // fails. In other words, all lines considered for deletion // must be found one by one. - - // if (deleteMatches <= 0) return false; - // pos++; } else if (isAddedDelimeter(controlChar, reverse)) { if (precedingLinesChecked && !contextLinesMatched && contextLines.size() > 0) |