mirror of https://github.com/apache/poi.git
XDGF: fix the fix
- Use Collections.emptySet() for an iterator instead - Bump curvesapi to 1.03, which is compiled for JDK 1.5 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1709463 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f5329e5b42
commit
5d571fe387
|
@ -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"/>
|
<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-->
|
<!-- 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"
|
<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.jar" location="${ooxml.lib}/xmlbeans-2.3.0.jar"/>
|
||||||
<property name="ooxml.xmlbeans23.url"
|
<property name="ooxml.xmlbeans23.url"
|
||||||
value="${repository.m2}/maven2/org/apache/xmlbeans/xmlbeans/2.3.0/xmlbeans-2.3.0.jar"/>
|
value="${repository.m2}/maven2/org/apache/xmlbeans/xmlbeans/2.3.0/xmlbeans-2.3.0.jar"/>
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.virtuald</groupId>
|
<groupId>com.github.virtuald</groupId>
|
||||||
<artifactId>curvesapi</artifactId>
|
<artifactId>curvesapi</artifactId>
|
||||||
<version>1.02</version>
|
<version>1.03</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -17,9 +17,11 @@
|
||||||
|
|
||||||
package org.apache.poi.xdgf.usermodel.section;
|
package org.apache.poi.xdgf.usermodel.section;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.SortedMap;
|
import java.util.SortedMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,25 +34,6 @@ public class CombinedIterable<T> implements Iterable<T> {
|
||||||
final SortedMap<Long, T> _baseItems;
|
final SortedMap<Long, T> _baseItems;
|
||||||
final SortedMap<Long, T> _masterItems;
|
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,
|
public CombinedIterable(SortedMap<Long, T> baseItems,
|
||||||
SortedMap<Long, T> masterItems) {
|
SortedMap<Long, T> masterItems) {
|
||||||
_baseItems = baseItems;
|
_baseItems = baseItems;
|
||||||
|
@ -62,10 +45,12 @@ public class CombinedIterable<T> implements Iterable<T> {
|
||||||
|
|
||||||
final Iterator<Entry<Long, T>> vmasterI;
|
final Iterator<Entry<Long, T>> vmasterI;
|
||||||
|
|
||||||
if (_masterItems != null)
|
if (_masterItems != null) {
|
||||||
vmasterI = _masterItems.entrySet().iterator();
|
vmasterI = _masterItems.entrySet().iterator();
|
||||||
else
|
} else {
|
||||||
vmasterI = new EmptyIterator<Entry<Long, T>>();
|
final Set<Entry<Long, T>> empty = Collections.emptySet();
|
||||||
|
vmasterI = empty.iterator();
|
||||||
|
}
|
||||||
|
|
||||||
return new Iterator<T>() {
|
return new Iterator<T>() {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue