tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java
Date Sat, 03 Jul 2004 19:38:26 GMT

----- Original Message ----- 
From: <markt@apache.org>
To: <jakarta-tomcat-catalina-cvs@apache.org>
Sent: Saturday, July 03, 2004 11:50 AM
Subject: cvs commit:
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java


===================================================================
>   RCS file:
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loa
der/WebappClassLoader.java,v
>   retrieving revision 1.36
>   retrieving revision 1.37
>   diff -u -r1.36 -r1.37
>   --- WebappClassLoader.java 25 Jun 2004 23:56:25 -0000 1.36
>   +++ WebappClassLoader.java 3 Jul 2004 18:50:10 -0000 1.37
>   @@ -1886,8 +1886,12 @@
>         */
>        protected boolean isPackageSealed(String name, Manifest man) {
>
>   -        String path = name + "/";
>   -        Attributes attr = man.getAttributes(path);
>   +        StringBuffer buf = new StringBuffer(name);
>   +        for (int i=0;i<buf.length();i++) {
>   +            if (buf.charAt(i)=='.') buf.setCharAt(i,'/');
>   +        }
>   +        buf.append('/');
>   +        Attributes attr = man.getAttributes(buf.toString());
>            String sealed = null;
>            if (attr != null) {
>                sealed = attr.getValue(Name.SEALED);
>
>

It's not a big deal, but wouldn't it be cleaner to do:
    String path = name.replace('.', '/') + "/";


>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>


Mime
View raw message