Skip to content

Commit

Permalink
stops a potential leak in JarClassPath openClassfile(). Issues #222.
Browse files Browse the repository at this point in the history
  • Loading branch information
chibash committed Sep 15, 2018
1 parent c32e946 commit 1719817
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/javassist/ClassPoolTail.java
Expand Up @@ -159,7 +159,9 @@ public InputStream openClassfile(String classname)
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?: "
Expand Down

0 comments on commit 1719817

Please sign in to comment.