mirror of https://github.com/apache/poi.git
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:
parent
842e71a3d7
commit
fd4410d50b
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -858,7 +858,7 @@ public class POIFSFileSystem extends BlockStore
|
|||
return getRoot().getViewableIterator();
|
||||
}
|
||||
|
||||
return Collections.emptyList().iterator();
|
||||
return Collections.emptyIterator();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -500,7 +500,7 @@ public abstract class Property implements Child, POIFSViewable {
|
|||
*/
|
||||
public Iterator<Object> getViewableIterator()
|
||||
{
|
||||
return Collections.emptyList().iterator();
|
||||
return Collections.emptyIterator();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue