changeset 7852:e282fa2c4093

[SCENEBUILDER] Improved FXOMCloner class to avoid WMI_WRONG_MAP_ITERATOR warning from FindBugs.
author eric.le.ponner <eric.le.ponner@oracle.com>
date Tue, 26 Aug 2014 11:16:42 +0200
parents 0e57456b1327
children 44cac66ba3ed
files apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMCloner.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMCloner.java	Tue Aug 26 11:04:45 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMCloner.java	Tue Aug 26 11:16:42 2014 +0200
@@ -307,7 +307,9 @@
             fxIds.remove(clonee.getFxId());
         }
         
-        for (String candidateFxId : fxIds.keySet()) {
+        for (Map.Entry<String, FXOMObject> e : fxIds.entrySet()) {
+            final String candidateFxId = e.getKey();
+            final FXOMObject declarer = e.getValue();
             
             final String renamedFxId = fxIdCollector.importFxId(candidateFxId);
             
@@ -321,7 +323,6 @@
                  */
                 
                 // 1)
-                final FXOMObject declarer = fxIds.get(candidateFxId);
                 declarer.setFxId(renamedFxId);
 
                 // 2)