Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2012-08-11 12:35:41 -0400
committerChristopher Frost2012-08-11 12:35:41 -0400
commit601b83a90cc66b0f5dda9e4d05967487ac276e71 (patch)
tree49d84d1d5d0c54c44bc5c5dbdac2227462b59f9b /org.eclipse.virgo.kernel.artifact
parent96c05a8f839a0b39eb02685ef6b297fecf931bb5 (diff)
downloadorg.eclipse.virgo.kernel-601b83a90cc66b0f5dda9e4d05967487ac276e71.tar.gz
org.eclipse.virgo.kernel-601b83a90cc66b0f5dda9e4d05967487ac276e71.tar.xz
org.eclipse.virgo.kernel-601b83a90cc66b0f5dda9e4d05967487ac276e71.zip
385314 improvements to the integration tests
Diffstat (limited to 'org.eclipse.virgo.kernel.artifact')
-rw-r--r--org.eclipse.virgo.kernel.artifact/.classpath2
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSEntry.java3
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/internal/BundleManifestUtils.java5
3 files changed, 7 insertions, 3 deletions
diff --git a/org.eclipse.virgo.kernel.artifact/.classpath b/org.eclipse.virgo.kernel.artifact/.classpath
index 4ba848ed..4db7f6bb 100644
--- a/org.eclipse.virgo.kernel.artifact/.classpath
+++ b/org.eclipse.virgo.kernel.artifact/.classpath
@@ -35,6 +35,6 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.6.0.D-20120810123218/org.eclipse.virgo.medic.core-3.6.0.D-20120810123218.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.5.0.D-20120615070622/org.eclipse.virgo.medic.core-sources-3.5.0.D-20120615070622.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi.services/3.3.0.v20120307-2102/org.eclipse.osgi.services-3.3.0.v20120307-2102.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110513/org.eclipse.osgi.services-sources-3.3.0.v20110513.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.nano.core/3.6.0.BUILD-20120808164733/org.eclipse.virgo.nano.core-3.6.0.BUILD-20120808164733.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.nano.core/3.6.0.BUILD-20120810212614/org.eclipse.virgo.nano.core-3.6.0.BUILD-20120810212614.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSEntry.java b/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSEntry.java
index 43d7d32f..916757fb 100644
--- a/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSEntry.java
+++ b/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSEntry.java
@@ -114,7 +114,8 @@ final class JarFileArtifactFSEntry implements ArtifactFSEntry {
/**
* {@inheritDoc}
*/
- public InputStream getInputStream() {
+ @SuppressWarnings("resource")
+ public InputStream getInputStream() {
JarFileScanner scanner = new JarFileScanner();
ZipEntry entry = scanner.getNextEntry();
while (entry != null && !this.entryName.equals(entry.getName())) {
diff --git a/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/internal/BundleManifestUtils.java b/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/internal/BundleManifestUtils.java
index dd7b68cb..57f6470e 100644
--- a/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/internal/BundleManifestUtils.java
+++ b/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/internal/BundleManifestUtils.java
@@ -14,6 +14,7 @@ package org.eclipse.virgo.kernel.artifact.internal;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringReader;
@@ -86,7 +87,9 @@ public final class BundleManifestUtils {
return null; // not an error -- no manifest means this isn't a bundle
}
StringWriter writer = new StringWriter();
- FileCopyUtils.copy(new InputStreamReader(fsEntry.getInputStream()), writer);
+ InputStream inputStream = fsEntry.getInputStream();
+ FileCopyUtils.copy(new InputStreamReader(inputStream), writer);
+ inputStream.close();
return new StringReader(writer.toString());
}

Back to the top