tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/depend DependClassLoader.java
Date Fri, 07 Sep 2001 04:25:20 GMT
costin      01/09/06 21:25:20

  Modified:    .        build.xml
               src/admin/WEB-INF/classes/tadm AntTag.java
               src/share/org/apache/tomcat/startup EmbededTomcat.java
                        Main.java
               src/share/org/apache/tomcat/util/compat Jdk11Compat.java
               src/share/org/apache/tomcat/util/depend
                        DependClassLoader.java
  Log:
  Excelent patch provided by James_THOMAS@enovia.com, restoring JDK1.1 support ( except one
  issue in DCL ).
  
  I'm still looking into the cause of what James describes ( the loading problems), if you
  have some traces I would be very interested to look at.
  
  Submitted by:	James_THOMAS@enovia.com
  
  Revision  Changes    Path
  1.151     +4 -1      jakarta-tomcat/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/build.xml,v
  retrieving revision 1.150
  retrieving revision 1.151
  diff -u -r1.150 -r1.151
  --- build.xml	2001/08/24 01:09:31	1.150
  +++ build.xml	2001/09/07 04:25:20	1.151
  @@ -298,7 +298,10 @@
         <include name="org/apache/tomcat/startup/Main.java"/>
         <include name="org/apache/tomcat/util/compat/**"/>
         <include name="org/apache/tomcat/util/depend/**"/>
  -      <exclude name="**/util/compat/Jdk12Support.java" unless="jdk12.present"/>
  +      <exclude name="**/util/depend/DependClassLoader12.java" 
  +	       unless="jdk12.present"/>
  +      <exclude name="**/util/compat/Jdk12Support.java" 
  +	       unless="jdk12.present"/>
         <include name="org/apache/tomcat/util/IntrospectionUtils.java"/>
       </javac>
       <jar jarfile="${tomcat.build}/lib/tomcat.jar"
  
  
  
  1.5       +1 -1      jakarta-tomcat/src/admin/WEB-INF/classes/tadm/AntTag.java
  
  Index: AntTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/admin/WEB-INF/classes/tadm/AntTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AntTag.java	2001/09/01 14:35:29	1.4
  +++ AntTag.java	2001/09/07 04:25:20	1.5
  @@ -21,7 +21,7 @@
       public int doStartTag() throws JspException {
   	try {
               args.clear();
  -            targets.clear();
  +            targets.removeAllElements();
   	    pageContext.setAttribute("antProperties",
   				     args);
   	} catch (Exception ex ) {
  
  
  
  1.52      +4 -1      jakarta-tomcat/src/share/org/apache/tomcat/startup/EmbededTomcat.java
  
  Index: EmbededTomcat.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/EmbededTomcat.java,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- EmbededTomcat.java	2001/09/01 15:03:36	1.51
  +++ EmbededTomcat.java	2001/09/07 04:25:20	1.52
  @@ -195,7 +195,10 @@
   	    setArgs((String [])v);
   	if( name.equals("commonClassPath")  )
   	    setCommonClassPath((URL [])v);
  -	attributes.put( name, v );
  +	if( v==null)
  +	    attributes.remove( name );
  +	else
  +	    attributes.put( name, v );
       }
       
       // Ant compatibility
  
  
  
  1.40      +3 -3      jakarta-tomcat/src/share/org/apache/tomcat/startup/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/Main.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- Main.java	2001/08/22 04:55:33	1.39
  +++ Main.java	2001/09/07 04:25:20	1.40
  @@ -1,4 +1,4 @@
  -/* $Id: Main.java,v 1.39 2001/08/22 04:55:33 costin Exp $
  +/* $Id: Main.java,v 1.40 2001/09/07 04:25:20 costin Exp $
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -212,8 +212,8 @@
   		    File.separator + "tomcat.policy";
   		
   		debug("Setting policy " + policyFile );
  -		System.setProperty( "tomcat.home", installDir );
  -		System.setProperty("java.security.policy",  policyFile);
  +		System.getProperties().put( "tomcat.home", installDir );
  +		System.getProperties().put("java.security.policy",  policyFile);
   		jdk11Compat.refreshPolicy();
   	    }
   	}
  
  
  
  1.11      +1 -1      jakarta-tomcat/src/share/org/apache/tomcat/util/compat/Jdk11Compat.java
  
  Index: Jdk11Compat.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/compat/Jdk11Compat.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Jdk11Compat.java	2001/08/22 04:44:49	1.10
  +++ Jdk11Compat.java	2001/09/07 04:25:20	1.11
  @@ -139,7 +139,7 @@
               if (depth==c) return ((SimpleClassLoader)cl).getURLs();
               c++;
               cl=((SimpleClassLoader)cl).getParentLoader();
  -        }while((cl!=null) && ( depth < c ));
  +        }while((cl!=null) && ( depth >= c ));
           return null;
       }
   
  
  
  
  1.8       +10 -3     jakarta-tomcat/src/share/org/apache/tomcat/util/depend/DependClassLoader.java
  
  Index: DependClassLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/depend/DependClassLoader.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DependClassLoader.java	2001/08/22 04:44:50	1.7
  +++ DependClassLoader.java	2001/09/07 04:25:20	1.8
  @@ -164,9 +164,6 @@
           String classFileName = name.replace('.', '/' ) + ".class";
   
   	URL res=getResource( classFileName );
  -	InputStream is=getResourceAsStream( classFileName );
  -	if( res==null || is==null ) 
  -	    throw new ClassNotFoundException(name);
   
   	// If it's in parent2, load it ( we'll not track sub-dependencies ).
   	try {
  @@ -180,6 +177,16 @@
   	} catch (Exception e) {
   	    c = null;
   	}
  +
  +	if( res==null ) 
  +	    throw new ClassNotFoundException(name);
  +
  +	// This should work - SimpleClassLoader should be able to get
  +	// resources from jar files. 
  +	InputStream is=getResourceAsStream( classFileName );
  +	if( is==null ) 
  +	    throw new ClassNotFoundException(name);
  +
   
   	// It's in our parent. Our task is to track all class loads, the parent
   	// should load anything ( otherwise the deps are lost ), but just resolve
  
  
  

Mime
View raw message