poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiwiwi...@apache.org
Subject svn commit: r1711708 - in /poi/trunk/src/java/org/apache/poi: hpsf/MutableSection.java ss/formula/CollaboratingWorkbooksEnvironment.java
Date Sat, 31 Oct 2015 23:13:35 GMT
Author: kiwiwings
Date: Sat Oct 31 23:13:35 2015
New Revision: 1711708

URL: http://svn.apache.org/viewvc?rev=1711708&view=rev
Log:
FindBugs fixes

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

Modified: poi/trunk/src/java/org/apache/poi/hpsf/MutableSection.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/MutableSection.java?rev=1711708&r1=1711707&r2=1711708&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/MutableSection.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/MutableSection.java Sat Oct 31 23:13:35 2015
@@ -505,10 +505,9 @@ public class MutableSection extends Sect
         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)
             {

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/CollaboratingWorkbooksEnvironment.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/CollaboratingWorkbooksEnvironment.java?rev=1711708&r1=1711707&r2=1711708&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/CollaboratingWorkbooksEnvironment.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/CollaboratingWorkbooksEnvironment.java Sat
Oct 31 23:13:35 2015
@@ -76,8 +76,9 @@ public final class CollaboratingWorkbook
     }
     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 {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message