Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2011-06-13 10:22:46 -0400
committerThomas Watson2011-06-13 10:22:46 -0400
commit188b6af62d71f218bbfd034df44348fcdb19150f (patch)
treea76832725986e003a3c72296718029ccdd927442
parentf76cc33b27f25dd63336c3151fe8876cec3fdff9 (diff)
downloadrt.equinox.framework-188b6af62d71f218bbfd034df44348fcdb19150f.tar.gz
rt.equinox.framework-188b6af62d71f218bbfd034df44348fcdb19150f.tar.xz
rt.equinox.framework-188b6af62d71f218bbfd034df44348fcdb19150f.zip
Bug 349121 - SignatureBlockProcessor.readIntoArray(BundleEntry) does not close input stream
-rw-r--r--bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/bundlefile/DirZipBundleEntry.java7
-rw-r--r--bundles/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignatureBlockProcessor.java6
2 files changed, 8 insertions, 5 deletions
diff --git a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/bundlefile/DirZipBundleEntry.java b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/bundlefile/DirZipBundleEntry.java
index de3209a4b..6061ee053 100644
--- a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/bundlefile/DirZipBundleEntry.java
+++ b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/bundlefile/DirZipBundleEntry.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,8 +11,7 @@
package org.eclipse.osgi.baseadaptor.bundlefile;
-import java.io.IOException;
-import java.io.InputStream;
+import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
@@ -42,7 +41,7 @@ public class DirZipBundleEntry extends BundleEntry {
* @throws IOException
*/
public InputStream getInputStream() throws IOException {
- return null;
+ return new ByteArrayInputStream(new byte[0]);
}
public long getSize() {
diff --git a/bundles/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignatureBlockProcessor.java b/bundles/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignatureBlockProcessor.java
index 2a937ffca..e83da7719 100644
--- a/bundles/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignatureBlockProcessor.java
+++ b/bundles/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignatureBlockProcessor.java
@@ -475,7 +475,11 @@ public class SignatureBlockProcessor implements SignedContentConstants {
}
return b;
} finally {
- is.close();
+ try {
+ is.close();
+ } catch (IOException e) {
+ // do nothing;
+ }
}
}

Back to the top