"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
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.