You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@hyperreal.org on 1999/11/05 03:09:09 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/jasper/compiler BeanGenerator.java

mandar      99/11/04 18:09:08

  Modified:    src/share/org/apache/jasper/compiler Tag:
                        TOMCAT_J2EE_10F_102199 BeanGenerator.java
  Log:
  Serialized bean fixes for J2EE.
  (commented out the translation-time checks).
  
  Submitted by:	Mandar
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.1.1.2.1 +38 -38    jakarta-tomcat/src/share/org/apache/jasper/compiler/BeanGenerator.java
  
  Index: BeanGenerator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/BeanGenerator.java,v
  retrieving revision 1.1.1.1
  retrieving revision 1.1.1.1.2.1
  diff -u -r1.1.1.1 -r1.1.1.1.2.1
  --- BeanGenerator.java	1999/10/09 00:20:34	1.1.1.1
  +++ BeanGenerator.java	1999/11/05 02:09:06	1.1.1.1.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/BeanGenerator.java,v 1.1.1.1 1999/10/09 00:20:34 duncan Exp $
  - * $Revision: 1.1.1.1 $
  - * $Date: 1999/10/09 00:20:34 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/BeanGenerator.java,v 1.1.1.1.2.1 1999/11/05 02:09:06 mandar Exp $
  + * $Revision: 1.1.1.1.2.1 $
  + * $Date: 1999/11/05 02:09:06 $
    *
    * ====================================================================
    * 
  @@ -134,49 +134,49 @@
   	    }
   
   	    if (clsname != null && beanName != null) {
  -                String m = Constants.getString("jsp.error.usebean.not.both",
  +		String m = Constants.getString("jsp.error.usebean.not.both",
   					       new Object[] {name});
   		throw new JasperException (m);
  -            }
  -
  +	    }	     
  +	    
   	    // Check if the class exists.
  -	    String className = (clsname == null) ? type : clsname;
  -	    try {
  -		boolean tmp = beanInfo.ClassFound (className);
  -	    } catch (ClassNotFoundException ex) {
  -                String m = Constants.getString(
  -			"jsp.error.usebean.class.notfound", 
  -			 new Object[] { className });
  -		throw new JasperException (m, ex);
  -	    }
  +	    //String className = (clsname == null) ? type : clsname;
  +	    //try {
  +	    //boolean tmp = beanInfo.ClassFound (className);
  +	    //} catch (ClassNotFoundException ex) {
  +	    //  String m = Constants.getString(
  +	    //	"jsp.error.usebean.class.notfound", 
  +	    //	 new Object[] { className });
  +	    //throw new JasperException (m, ex);
  +	    //}
   	    
   	    // Check if beanName exists.
  -	    if (beanName != null) {
  -		try {
  -		  boolean  tmp = beanInfo.beanFound (beanName);
  -		} catch (ClassNotFoundException ex) {
  -                    String m = Constants.getString(
  -		    		"jsp.error.usebean.class.notfound", 
  -				new Object[] { beanName });
  -		    throw new JasperException (m, ex);
  -		} 
  -	    }
  +	    //if (beanName != null) {
  +	    //try {
  +	    //  boolean  tmp = beanInfo.beanFound (beanName);
  +	    //} catch (ClassNotFoundException ex) {
  +	    //      String m = Constants.getString(
  +	    //    		"jsp.error.usebean.class.notfound", 
  +	    //		new Object[] { beanName });
  +	    //    throw new JasperException (m, ex);
  +	    //} 
  +	    //}
   	    
   	    // class must be assignable to type.
  -	    if (clsname != null && type != null) {
  -		try {
  -		    Class tp = beanInfo.getClass (type);
  -		    Class cl = beanInfo.getClass (clsname);
  -		    if (!tp.isAssignableFrom(cl)) {
  -                        String m = Constants.getString("jsp.error.usebean.bad.type.cast",
  -						       new Object[] {name, type, clsname});
  -			throw new JasperException (m);
  -                    }
  +	    //if (clsname != null && type != null) {
  +	    //try {
  +	    //    Class tp = beanInfo.getClass (type);
  +	    //    Class cl = beanInfo.getClass (clsname);
  +	    //    if (!tp.isAssignableFrom(cl)) {
  +	    //          String m = Constants.getString("jsp.error.usebean.bad.type.cast",
  +	    //				       new Object[] {name, type, clsname});
  +	    //	throw new JasperException (m);
  +	    //      }
                       
  -		} catch (ClassNotFoundException ex) {
  -		    throw new JasperException (ex);
  -		}
  -	    }
  +	    //} catch (ClassNotFoundException ex) {
  +	    //    throw new JasperException (ex);
  +	    //}
  +	    //}
   
   	    if (clsname == null) clsname = type;
   	    if (scope == null || scope.equals("page")) {