tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amy...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup ClassLoaderFactory.java
Date Tue, 24 Aug 2004 17:53:53 GMT
amyroh      2004/08/24 10:53:52

  Modified:    catalina/src/share/org/apache/catalina/startup Tag:
                        TOMCAT_5_0 ClassLoaderFactory.java
  Log:
  Do not load outdated xml-apis.jar & xercesImpl.jar from endorsed if JDK 5.0 is used.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.6.2.1   +20 -2     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ClassLoaderFactory.java
  
  Index: ClassLoaderFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ClassLoaderFactory.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- ClassLoaderFactory.java	27 Feb 2004 14:58:48 -0000	1.6
  +++ ClassLoaderFactory.java	24 Aug 2004 17:53:52 -0000	1.6.2.1
  @@ -23,6 +23,7 @@
   import java.util.ArrayList;
   
   import org.apache.catalina.loader.StandardClassLoader;
  +import org.apache.tomcat.util.compat.JdkCompat;
   
   
   /**
  @@ -56,6 +57,12 @@
       private static int debug = 0;
   
   
  +    /**
  +     * JDK compatibility support
  +     */
  +    private static final JdkCompat jdkCompat = JdkCompat.getJdkCompat();
  +    
  +    
       // ------------------------------------------------------ Static Properties
   
   
  @@ -170,7 +177,18 @@
                           log("  Including jar file " + file.getAbsolutePath());
                       URL url = new URL("file", null,
                                         file.getCanonicalPath());
  -                    list.add(url.toString());
  +                    
  +                    if (ClassLoaderFactory.jdkCompat.isJava15()) {
  +                        if (url.toString().endsWith("xml-apis.jar") ||
  +                            url.toString().endsWith("xercesImpl.jar")) {
  +                            // Do not load xml-apis.jar & xercesImpl.jar
  +                            // if JDK 5.0 is used
  +                        } else {
  +                            list.add(url.toString());
  +                        }
  +                    } else {
  +                        list.add(url.toString());
  +                    }    
                   }
               }
           }
  
  
  

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