Code review request 7183373: URLClassloader.close() does not close JAR files whose resources have been loaded via getResource() (original) (raw)
Shirish Kuncolienkar shirishk at linux.vnet.ibm.com
Thu Aug 23 10:50:23 PDT 2012
- Previous message: hg: jdk8/tl/jdk: 7191587: (se) SelectionKey.interestOps does not defer changing the interest set to the next select [macosx]
- Next message: Code review request 7183373: URLClassloader.close() does not close JAR files whose resources have been loaded via getResource()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Could I get the change reviewed please
This behavior is seen on Windows. Logic in URLClassPath.getLoader() does not take care of an URL which looks like "jar:file:/C:/test/xyz.jar!/". The logic ends up choosing a FileLoader instead of a JarLoader. JarLoader has provision for closing file handles, so choosing a JarLoader will solve the problem. Secondly the constructor of JarLoader blindly adds a prefix and suffix to the provided URL to make it look like a jar URL. Changed the code here to conditionally append/prepend
The change set can be found at http://cr.openjdk.java.net/~shirishk/7183373/webrev.0/
-Shirish
- Previous message: hg: jdk8/tl/jdk: 7191587: (se) SelectionKey.interestOps does not defer changing the interest set to the next select [macosx]
- Next message: Code review request 7183373: URLClassloader.close() does not close JAR files whose resources have been loaded via getResource()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]