[jboss-cvs] JBossAS SVN: r94774 - projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 13 12:15:51 EDT 2009
Author: david.lloyd at jboss.com
Date: 2009-10-13 12:15:51 -0400 (Tue, 13 Oct 2009)
New Revision: 94774
Modified:
projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/VirtualJarInputStream.java
Log:
Avoid object creation for manifest name filter
Modified: projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/VirtualJarInputStream.java
===================================================================
--- projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/VirtualJarInputStream.java 2009-10-13 14:52:28 UTC (rev 94773)
+++ projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/VirtualJarInputStream.java 2009-10-13 16:15:51 UTC (rev 94774)
@@ -58,6 +58,12 @@
private boolean closed;
+ private static final VirtualFileFilter MANIFEST_FILTER = new VirtualFileFilter() {
+ public boolean accepts(VirtualFile file) {
+ return !MANIFEST_NAME.equalsIgnoreCase(file.getName());
+ }
+ };
+
/**
* Construct a {@link VirtualJarInputStream} from a {@link VirtualFile} root
*
@@ -99,11 +105,7 @@
if (nextEntry.isDirectory()) {
List<VirtualFile> children = nextEntry.getChildren();
if(entryName.equalsIgnoreCase(META_INF_DIR)) {
- children = nextEntry.getChildren(new VirtualFileFilter() {
- public boolean accepts(VirtualFile file) {
- return !MANIFEST_NAME.equalsIgnoreCase(file.getName());
- }
- });
+ children = nextEntry.getChildren(MANIFEST_FILTER);
}
entryItr.add(children.iterator());
entryName = fixDirectoryName(entryName);
More information about the jboss-cvs-commits
mailing list