replace some calls to Collection methods with shorter/more effective versions

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1874263 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Axel Howind 2020-02-20 16:27:19 +00:00
parent 842e71a3d7
commit fd4410d50b
4 changed files with 6 additions and 6 deletions

View File

@ -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<ByteBuffer>
* store
*/
public Iterator<Object> getViewableIterator() {
return emptyList().iterator();
return emptyIterator();
}
/**

View File

@ -858,7 +858,7 @@ public class POIFSFileSystem extends BlockStore
return getRoot().getViewableIterator();
}
return Collections.emptyList().iterator();
return Collections.emptyIterator();
}
/**

View File

@ -500,7 +500,7 @@ public abstract class Property implements Child, POIFSViewable {
*/
public Iterator<Object> getViewableIterator()
{
return Collections.emptyList().iterator();
return Collections.emptyIterator();
}
/**

View File

@ -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)));
}
/**