diff options
-rw-r--r-- | build.xml | 4 | ||||
-rw-r--r-- | maven/poi-ooxml.pom | 2 | ||||
-rw-r--r-- | src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java | 29 |
3 files changed, 10 insertions, 25 deletions
@@ -177,9 +177,9 @@ under the License. <property name="dsig.sl4j-api.url" value="${repository.m2}/maven2/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar"/> <!-- jars in the lib-ooxml directory, see the fetch-ooxml-jars target--> - <property name="ooxml.curvesapi.jar" location="${ooxml.lib}/curvesapi-1.02.jar"/> + <property name="ooxml.curvesapi.jar" location="${ooxml.lib}/curvesapi-1.03.jar"/> <property name="ooxml.curvesapi.url" - value="${repository.m2}/maven2/com/github/virtuald/curvesapi/1.02/curvesapi-1.02.jar"/> + value="${repository.m2}/maven2/com/github/virtuald/curvesapi/1.03/curvesapi-1.03.jar"/> <property name="ooxml.xmlbeans23.jar" location="${ooxml.lib}/xmlbeans-2.3.0.jar"/> <property name="ooxml.xmlbeans23.url" value="${repository.m2}/maven2/org/apache/xmlbeans/xmlbeans/2.3.0/xmlbeans-2.3.0.jar"/> diff --git a/maven/poi-ooxml.pom b/maven/poi-ooxml.pom index 5850def217..641934693f 100644 --- a/maven/poi-ooxml.pom +++ b/maven/poi-ooxml.pom @@ -72,7 +72,7 @@ <dependency> <groupId>com.github.virtuald</groupId> <artifactId>curvesapi</artifactId> - <version>1.02</version> + <version>1.03</version> </dependency> </dependencies> </project> diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java index e5cb8144ca..bca48bc096 100644 --- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java +++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java @@ -17,9 +17,11 @@ package org.apache.poi.xdgf.usermodel.section; +import java.util.Collections; import java.util.Iterator; import java.util.Map.Entry; import java.util.NoSuchElementException; +import java.util.Set; import java.util.SortedMap; /** @@ -31,25 +33,6 @@ public class CombinedIterable<T> implements Iterable<T> { final SortedMap<Long, T> _baseItems; final SortedMap<Long, T> _masterItems; - - private static final class EmptyIterator<T> implements Iterator<T> { - - @Override - public boolean hasNext() { - return false; - } - - @Override - public T next() { - return null; - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - } public CombinedIterable(SortedMap<Long, T> baseItems, SortedMap<Long, T> masterItems) { @@ -62,10 +45,12 @@ public class CombinedIterable<T> implements Iterable<T> { final Iterator<Entry<Long, T>> vmasterI; - if (_masterItems != null) + if (_masterItems != null) { vmasterI = _masterItems.entrySet().iterator(); - else - vmasterI = new EmptyIterator<Entry<Long, T>>(); + } else { + final Set<Entry<Long, T>> empty = Collections.emptySet(); + vmasterI = empty.iterator(); + } return new Iterator<T>() { |