diff --git a/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java b/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java index e43029d459..05881561b1 100644 --- a/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java +++ b/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java @@ -17,7 +17,7 @@ package org.apache.poi.poifs.filesystem; -import static java.util.Collections.emptyList; +import static java.util.Collections.emptyIterator; import java.io.BufferedInputStream; import java.io.IOException; @@ -235,7 +235,7 @@ public final class POIFSDocument implements POIFSViewable, Iterable * store */ public Iterator getViewableIterator() { - return emptyList().iterator(); + return emptyIterator(); } /** diff --git a/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java b/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java index 12e408ee63..23d9b3e2b0 100644 --- a/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java +++ b/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java @@ -858,7 +858,7 @@ public class POIFSFileSystem extends BlockStore return getRoot().getViewableIterator(); } - return Collections.emptyList().iterator(); + return Collections.emptyIterator(); } /** diff --git a/src/java/org/apache/poi/poifs/property/Property.java b/src/java/org/apache/poi/poifs/property/Property.java index 59727a3584..a994ff133b 100644 --- a/src/java/org/apache/poi/poifs/property/Property.java +++ b/src/java/org/apache/poi/poifs/property/Property.java @@ -500,7 +500,7 @@ public abstract class Property implements Child, POIFSViewable { */ public Iterator getViewableIterator() { - return Collections.emptyList().iterator(); + return Collections.emptyIterator(); } /** diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java index 4ca6189955..5b356843c8 100644 --- a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java +++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java @@ -286,8 +286,8 @@ public abstract class ContentTypeManager { throw new IllegalArgumentException("contentType"); } - return (this.defaultContentType.values().contains(contentType) || (this.overrideContentType != null && this.overrideContentType - .values().contains(contentType))); + return (this.defaultContentType.containsValue(contentType) || + (this.overrideContentType != null && this.overrideContentType.containsValue(contentType))); } /**