diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-18 11:13:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-05 09:56:12 +0200 |
commit | 3c6d932fa841e102818abd31b7538728085d99e1 (patch) | |
tree | 4b0d46ac5d41d7fbe94283170e7a975029dee2af /toolkit/test | |
parent | java: these fields can become local variables (diff) | |
download | core-3c6d932fa841e102818abd31b7538728085d99e1.tar.gz core-3c6d932fa841e102818abd31b7538728085d99e1.zip |
java: was passing the wrong thing to the remove method
on a Map, we need to pass the key, not the value, to be deleted
Found by FindBugs.
Change-Id: If6fd3d8d56a7c7dfabac31d8ee268939e582f4eb
Diffstat (limited to 'toolkit/test')
-rw-r--r-- | toolkit/test/accessibility/Canvas.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toolkit/test/accessibility/Canvas.java b/toolkit/test/accessibility/Canvas.java index e2e1fabf0810..c254ed62c5e8 100644 --- a/toolkit/test/accessibility/Canvas.java +++ b/toolkit/test/accessibility/Canvas.java @@ -116,9 +116,9 @@ class Canvas int i = maNodes.indexOf (aNode); if( i != -1 ) { - Object aObject = maObjects.get(aNode); + CanvasShape aObject = maObjects.get(aNode); maObjectList.remove (aObject); - maObjects.remove (aObject); + maObjects.remove (aNode); maNodes.remove (aNode); repaint (); } |