[ https://issues.apache.org/jira/browse/GERONIMO-4785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan resolved GERONIMO-4785. ---------------------------- Resolution: Fixed Fix Version/s: 2.2 2.1.5 Commit changes to trunk At revision: 811979, 2.1.5 At revision: 811978, 2.2 At revision: 811977. Thanks for the patch, Jack ! > "useCaches" property of JarFileUrlConnection doesn't work > --------------------------------------------------------- > > Key: GERONIMO-4785 > URL: https://issues.apache.org/jira/browse/GERONIMO-4785 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues) > Components: kernel > Affects Versions: 2.1.4 > Environment: Sun JDK 1.5.0.19 > Reporter: Masayoshi Yamashita > Fix For: 2.1.5, 2.2 > > Attachments: GERONIMO-4785.patch > > > When executing the following code on Geronimo server, > ===================================================================== > ClassLoader loader = Thread.currentThread().getContextClassLoader(); > URL url = loader.getResource("javax/servlet/http/"); > JarURLConnection conn1 = (JarURLConnection) url.openConnection(); > conn1.setUseCaches(false); > JarFile jarFile1 = conn1.getJarFile(); > JarURLConnection conn2 = (JarURLConnection) url.openConnection(); > conn2.setUseCaches(false); > JarFile jarFile2 = conn2.getJarFile(); > System.out.println(jarFile1); > System.out.println(jarFile2); > ===================================================================== > there is a problem that "jarFile1" and "jarFile2" are same instances. > Also, it is described in the javadoc of "useCaches" field as follows. > "If false, the protocol must always try to get a fresh copy of the object." > "org.apache.geronimo.kernel.classloader.JarFileUrlConnection" must return a > different instance, when "useCaches" is false. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.