Skip to content

The empty line is ignored #31

Description

@mrdrivingduck

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions