[jboss-cvs] JBossAS SVN: r94780 - 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:40:22 EDT 2009
Author: david.lloyd at jboss.com
Date: 2009-10-13 12:40:22 -0400 (Tue, 13 Oct 2009)
New Revision: 94780
Modified:
projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/VirtualJarInputStream.java
Log:
Minor simplification
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 16:37:21 UTC (rev 94779)
+++ projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/VirtualJarInputStream.java 2009-10-13 16:40:22 UTC (rev 94780)
@@ -53,6 +53,7 @@
private final Deque<Iterator<VirtualFile>> entryItr = new ArrayDeque<Iterator<VirtualFile>>();
private final VirtualFile root;
+ private final Manifest manifest;
private InputStream currentEntryStream;
@@ -76,6 +77,9 @@
VirtualFile manifest = root.getChild(JarFile.MANIFEST_NAME);
if(manifest.exists()) {
entryItr.add(Collections.singleton(manifest).iterator());
+ this.manifest = VFSUtils.readManifest(manifest);
+ } else {
+ this.manifest = null;
}
entryItr.add(root.getChildren().iterator());
}
@@ -124,12 +128,7 @@
/** {@inheritDoc} **/
@Override
public Manifest getManifest() {
- try {
- return VFSUtils.getManifest(root);
- }
- catch (IOException e) {
- throw new RuntimeException(e);
- }
+ return manifest;
}
/** {@inheritDoc} **/
More information about the jboss-cvs-commits
mailing list