remm 02/05/22 16:35:52 Modified: catalina/src/share/org/apache/catalina/loader WebappClassLoader.java Log: - Fix the timing of the call to JarEntry.getCertificates(). Very subtle bug overall. Thanks to Michael Eriksson <Michael.Eriksson at bauer-partner.com> for the explanation and the patch. - Fixes bug 7578. Revision Changes Path 1.39 +10 -5 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java Index: WebappClassLoader.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- WebappClassLoader.java 16 May 2002 01:06:29 -0000 1.38 +++ WebappClassLoader.java 22 May 2002 23:35:52 -0000 1.39 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v 1.38 2002/05/16 01:06:29 remm Exp $ - * $Revision: 1.38 $ - * $Date: 2002/05/16 01:06:29 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v 1.39 2002/05/22 23:35:52 remm Exp $ + * $Revision: 1.39 $ + * $Date: 2002/05/22 23:35:52 $ * * ==================================================================== * @@ -145,7 +145,7 @@ * * @author Remy Maucherat * @author Craig R. McClanahan - * @version $Revision: 1.38 $ $Date: 2002/05/16 01:06:29 $ + * @version $Revision: 1.39 $ $Date: 2002/05/22 23:35:52 $ */ public class WebappClassLoader extends URLClassLoader @@ -1764,7 +1764,6 @@ } catch (MalformedURLException e) { return null; } - entry.certificates = jarEntry.getCertificates(); contentLength = (int) jarEntry.getSize(); try { entry.manifest = jarFiles[i].getManifest(); @@ -1806,6 +1805,12 @@ } entry.binaryContent = binaryContent; + + // The certificates are only available after the JarEntry + // associated input stream has been fully read + if (jarEntry != null) { + entry.certificates = jarEntry.getCertificates(); + } }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>