-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
The test case is as follows:
diff --git a/source/org/jfree/data/DefaultKeyedValues.java b/source/org/jfree/data/DefaultKeyedValues.java
index 5569198..707eb0a 100644
--- a/source/org/jfree/data/DefaultKeyedValues.java
+++ b/source/org/jfree/data/DefaultKeyedValues.java
@@ -315,7 +315,9 @@ public class DefaultKeyedValues implements KeyedValues,
public void removeValue(int index) {
this.keys.remove(index);
this.values.remove(index);
+ if (index < this.keys.size()) {
rebuildIndex();
+ }
}
/**
@@ -330,8 +332,7 @@ public class DefaultKeyedValues implements KeyedValues,
public void removeValue(Comparable key) {
int index = getIndex(key);
if (index < 0) {
- throw new UnknownKeyException("The key (" + key
- + ") is not recognised.");
+ return;
}
removeValue(index);
}There should be two hunks, but the first hunk ends at line 321, and the second hunk is completely ignored.
Metadata
Metadata
Assignees
Labels
No labels