]> source.dussan.org Git - poi.git/commitdiff
FindBugs fixes
authorAndreas Beeker <kiwiwings@apache.org>
Sat, 31 Oct 2015 23:13:35 +0000 (23:13 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Sat, 31 Oct 2015 23:13:35 +0000 (23:13 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711708 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hpsf/MutableSection.java
src/java/org/apache/poi/ss/formula/CollaboratingWorkbooksEnvironment.java

index cb864fa8b1851dac0f22e53f080ec00b2968ce6a..b0d71acf0e622f999a272205b4a9d41e3c9aa8c3 100644 (file)
@@ -505,10 +505,9 @@ public class MutableSection extends Section
         throws IOException
     {
         int length = TypeWriter.writeUIntToStream(out, dictionary.size());
-        for (final Iterator<Long> i = dictionary.keySet().iterator(); i.hasNext();)
-        {
-            final Long key = i.next();
-            final String value = dictionary.get(key);
+        for (Map.Entry<Long,String> ls : dictionary.entrySet()) {
+            final Long key = ls.getKey();
+            final String value = ls.getValue();
 
             if (codepage == CodePageUtil.CP_UNICODE)
             {
index 00b3e8bfcb7d1a3caeac09f0735453d19774e57d..074e7a18da25de546ab9d1159f2fb89c5243303f 100644 (file)
@@ -76,8 +76,9 @@ public final class CollaboratingWorkbooksEnvironment {
     }
     public static void setupFormulaEvaluator(Map<String,FormulaEvaluator> evaluators) {
         Map<String, WorkbookEvaluator> evaluatorsByName = new HashMap<String, WorkbookEvaluator>(evaluators.size());
-        for (String wbName : evaluators.keySet()) {
-            FormulaEvaluator eval = evaluators.get(wbName);
+        for (Map.Entry<String,FormulaEvaluator> swb : evaluators.entrySet()) {
+            String wbName = swb.getKey();
+            FormulaEvaluator eval = swb.getValue();
             if (eval instanceof WorkbookEvaluatorProvider) {
                 evaluatorsByName.put(wbName, ((WorkbookEvaluatorProvider)eval)._getWorkbookEvaluator());
             } else {