Change keySet iterator to an entrySet iterator to avoid an extra get call on 
the Map


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/4fa2e62d
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/4fa2e62d
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/4fa2e62d

Branch: refs/heads/2292-findbugs
Commit: 4fa2e62deb420a2f0b4afadf2a39be846cd295f2
Parents: cbf8a9f
Author: Josh Elser <els...@apache.org>
Authored: Thu Jan 30 16:36:43 2014 -0500
Committer: Josh Elser <els...@apache.org>
Committed: Thu Jan 30 17:19:52 2014 -0500

----------------------------------------------------------------------
 .../accumulo/core/client/admin/TableOperationsImpl.java      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/4fa2e62d/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
index 3f5ac8c..307243d 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
@@ -1236,13 +1236,13 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
 
     try {
       FileSystem fs = 
FileUtil.getFileSystem(CachedConfiguration.getInstance(), 
instance.getConfiguration());
-      ;
+
       Map<String,String> props = getExportedProps(fs, new Path(importDir, 
Constants.EXPORT_FILE));
 
-      for (String propKey : props.keySet()) {
-        if (Property.isClassProperty(propKey) && 
!props.get(propKey).contains(Constants.CORE_PACKAGE_NAME)) {
+      for (Entry<String,String> prop : props.entrySet()) {
+        if (Property.isClassProperty(prop.getKey()) && 
!prop.getValue().contains(Constants.CORE_PACKAGE_NAME)) {
           Logger.getLogger(this.getClass()).info(
-              "Imported table sets '" + propKey + "' to '" + 
props.get(propKey) + "'.  Ensure this class is on Accumulo classpath.");
+              "Imported table sets '" + prop.getKey() + "' to '" + 
prop.getValue() + "'.  Ensure this class is on Accumulo classpath.");
         }
       }
 

Reply via email to