United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-8010282 : sun.net.www.protocol.jar.JarFileFactory.close(JarFile) should be thread-safe

Details
Type:
Bug
Submit Date:
2013-03-19
Status:
Closed
Updated Date:
2014-02-10
Project Name:
JDK
Resolved Date:
2013-03-20
Component:
core-libs
OS:
Sub-Component:
java.net
CPU:
Priority:
P3
Resolution:
Fixed
Affected Versions:
Fixed Versions:

Related Reports
Backport:
Backport:

Sub Tasks

Description
JarFileFactory has two Maps that it uses to implement caching of jar files. Access to these maps should always be done while holding the instance lock, as multiple threads can be simultaneously updating the maps.

The close method was added some time after the original implementation, and it looks like the locking was forgotten. Also, the locking strategy assumes that JarFileFactory is a singleton. It could be reworked to make it more robust.
                                    

Comments
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/3070b7363853
User:  chegar
Date:  2013-03-20 16:00:54 +0000

                                     
2013-03-20
URL:   http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/3070b7363853
User:  lana
Date:  2013-04-02 17:50:39 +0000

                                     
2013-04-02



Hardware and Software, Engineered to Work Together