sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1517490 - /sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java
Date Mon, 26 Aug 2013 10:57:23 GMT
Author: desruisseaux
Date: Mon Aug 26 10:57:22 2013
New Revision: 1517490

URL: http://svn.apache.org/r1517490
Log:
Fixed a never ending loop.

Modified:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java?rev=1517490&r1=1517489&r2=1517490&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java
[UTF-8] Mon Aug 26 10:57:22 2013
@@ -298,7 +298,9 @@ final class Properties extends AbstractM
         @Override
         public Entry<String, Object> next() {
             if (hasNext()) {
-                return new SimpleImmutableEntry<>(KEYS[nextIndex-1], value);
+                final Entry<String, Object> entry = new SimpleImmutableEntry<>(KEYS[nextIndex-1],
value);
+                value = null; // For forcing the next call to 'hasNext()' to increment 'nextIndex'.
+                return entry;
             }
             throw new NoSuchElementException();
         }



Mime
View raw message