aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/ClassPoolTail.java
diff options
context:
space:
mode:
authorchibash <chiba@javassist.org>2018-09-15 12:06:25 +0900
committerchibash <chiba@javassist.org>2018-09-15 12:06:25 +0900
commit17198176b9a7c4cca477236ca99b51f885662225 (patch)
treef31def9bc5cdfe77852bfba1d9a154805c14b315 /src/main/javassist/ClassPoolTail.java
parentc32e946317054a13214b772188a3daa8fc44f425 (diff)
downloadjavassist-17198176b9a7c4cca477236ca99b51f885662225.tar.gz
javassist-17198176b9a7c4cca477236ca99b51f885662225.zip
stops a potential leak in JarClassPath openClassfile(). Issues #222.
Diffstat (limited to 'src/main/javassist/ClassPoolTail.java')
-rw-r--r--src/main/javassist/ClassPoolTail.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/javassist/ClassPoolTail.java b/src/main/javassist/ClassPoolTail.java
index 2ab8ee46..965d72fb 100644
--- a/src/main/javassist/ClassPoolTail.java
+++ b/src/main/javassist/ClassPoolTail.java
@@ -159,7 +159,9 @@ final class JarClassPath implements ClassPath {
URL jarURL = find(classname);
if (null != jarURL)
try {
- return jarURL.openConnection().getInputStream();
+ java.net.URLConnection con = jarURL.openConnection();
+ con.setUseCaches(false);
+ return con.getInputStream();
}
catch (IOException e) {
throw new NotFoundException("broken jar file?: "