From 17198176b9a7c4cca477236ca99b51f885662225 Mon Sep 17 00:00:00 2001 From: chibash Date: Sat, 15 Sep 2018 12:06:25 +0900 Subject: [PATCH] stops a potential leak in JarClassPath openClassfile(). Issues #222. --- src/main/javassist/ClassPoolTail.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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?: " -- 2.39.5