Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2005-05-09 09:55:59 +0000
committerAndre Weinand2005-05-09 09:55:59 +0000
commit49d415401bd3897451166d66b49daf5018b3b3f0 (patch)
treeec870da9477c3f668fcd7289e3f3bd5d5b8afbd2
parent4ca5b01f28262ec2d2cfa890160b8139cf60c786 (diff)
downloadeclipse.platform.team-49d415401bd3897451166d66b49daf5018b3b3f0.tar.gz
eclipse.platform.team-49d415401bd3897451166d66b49daf5018b3b3f0.tar.xz
eclipse.platform.team-49d415401bd3897451166d66b49daf5018b3b3f0.zip
fixed #94077: IndexOutOfBounds applying patch
-rw-r--r--bundles/org.eclipse.compare/buildnotes_compare.html1
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java2
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html1
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java2
4 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/buildnotes_compare.html
index 0943dd5d7..4ef3bb6e2 100644
--- a/bundles/org.eclipse.compare/buildnotes_compare.html
+++ b/bundles/org.eclipse.compare/buildnotes_compare.html
@@ -22,6 +22,7 @@ Eclipse Build Input May 10th 2005
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=78653">78653</a>: Eclipse compare support does not appear to use file inspection correctly<br>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=78652">78652</a>: content type should be bound hierarchically<br>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=93924">93924</a>: Add keywords to preference pages<br>
+<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=94077">94077</a>: IndexOutOfBounds applying patch<br>
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
index e6e958e22..a459aad6b 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
@@ -729,7 +729,7 @@ public class Patcher {
lines.remove(pos);
} else if (controlChar == '+') {
// added lines
- if (hunk.fOldLength == 0)
+ if (hunk.fOldLength == 0 && pos+1 < lines.size())
lines.add(pos+1, line);
else
lines.add(pos, line);
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
index 0943dd5d7..4ef3bb6e2 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
@@ -22,6 +22,7 @@ Eclipse Build Input May 10th 2005
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=78653">78653</a>: Eclipse compare support does not appear to use file inspection correctly<br>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=78652">78652</a>: content type should be bound hierarchically<br>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=93924">93924</a>: Add keywords to preference pages<br>
+<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=94077">94077</a>: IndexOutOfBounds applying patch<br>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
index e6e958e22..a459aad6b 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
@@ -729,7 +729,7 @@ public class Patcher {
lines.remove(pos);
} else if (controlChar == '+') {
// added lines
- if (hunk.fOldLength == 0)
+ if (hunk.fOldLength == 0 && pos+1 < lines.size())
lines.add(pos+1, line);
else
lines.add(pos, line);

Back to the top