You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by lu...@apache.org on 2002/10/09 22:21:53 UTC

cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime JspRuntimeLibrary.java

luehe       2002/10/09 13:21:52

  Modified:    jasper2/src/share/org/apache/jasper/resources
                        messages.properties messages_es.properties
                        messages_ja.properties
               jasper2/src/share/org/apache/jasper/runtime
                        JspRuntimeLibrary.java
  Log:
  Fixed 13206: Invalid java bean property error message could be reported better.
  
  Revision  Changes    Path
  1.45      +2 -2      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties
  
  Index: messages.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- messages.properties	8 Oct 2002 23:22:57 -0000	1.44
  +++ messages.properties	9 Oct 2002 20:21:52 -0000	1.45
  @@ -94,7 +94,7 @@
   jsp.error.beans.nobeaninfo=No BeanInfo for the bean of type ''{0}'' could be found, the class likely does not exist.
   jsp.error.beans.introspection=An exception occurred while introspecting the read method of property ''{0}'' in a bean of type ''{1}'':\n{2}
   jsp.error.beans.nomethod=Cannot find a method to read property ''{0}'' in a bean of type ''{1}''
  -jsp.error.beans.nomethod.setproperty=Can''t find a method to write property ''{0}'' in a bean of type ''{1}''
  +jsp.error.beans.nomethod.setproperty=Can''t find a method to write property ''{0}'' of type ''{1}'' in a bean of type ''{2}''
   jsp.error.beans.noproperty=Cannot find any information on property ''{0}'' in a bean of type ''{1}''
   jsp.error.beans.setproperty.noindexset=Cannot set indexed property
   jsp.error.include.tag=Invalid jsp:include tag
  
  
  
  1.16      +2 -2      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_es.properties
  
  Index: messages_es.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_es.properties,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- messages_es.properties	8 Oct 2002 23:22:57 -0000	1.15
  +++ messages_es.properties	9 Oct 2002 20:21:52 -0000	1.16
  @@ -73,7 +73,7 @@
   jsp.error.beans.nobeaninfo=No se puede encontrar BeanInfo para el bean  ''{0}'' seguramente la clase no existe
   jsp.error.beans.introspection=Una excepcion a ocurrido mientras se leia el metodo de lectura de la propiedad ''{0}'' en un bean del tipo ''{1}'':\n{2}
   jsp.error.beans.nomethod=No puedo encontrar un metodo para leer la propiedad ''{0}'' en un bean del tipo ''{1}''
  -jsp.error.beans.nomethod.setproperty=No puedo encontrar un metodo para write de la propiedad ''{0}'' en un bean del tipo ''{1}''
  +jsp.error.beans.nomethod.setproperty=No puedo encontrar un metodo para write de la propiedad ''{0}'' en un bean del tipo ''{2}''
   jsp.error.beans.noproperty=No puedo encontrar informacion de la propiedad ''{0}'' en un bean del tipo ''{1}''
   jsp.error.beans.setproperty.noindexset=No puedo hacer set de la propiedad indexada
   jsp.error.include.tag=Tag jsp:include no valido
  
  
  
  1.16      +2 -2      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_ja.properties
  
  Index: messages_ja.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_ja.properties,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- messages_ja.properties	8 Oct 2002 23:22:57 -0000	1.15
  +++ messages_ja.properties	9 Oct 2002 20:21:52 -0000	1.16
  @@ -84,7 +84,7 @@
   jsp.error.beans.nobeaninfo=\u30bf\u30a4\u30d7 ''{0}'' \u306eBean\u306bBeanInfo\u304c\u306a\u3044\u306e\u3092\u691c\u51fa\u3057\u307e\u3057\u305f, \u30af\u30e9\u30b9\u304c\u5b58\u5728\u3057\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093
   jsp.error.beans.introspection=\u30bf\u30a4\u30d7 ''{1}'' \u306eBean\u4e2d\u306e\u5c5e\u6027 ''{0}'' \u306eread\u30e1\u30bd\u30c3\u30c9\u3092\u5185\u7701\u4e2d\u306b\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f:\n{2}
   jsp.error.beans.nomethod=\u30bf\u30a4\u30d7 ''{1}'' \u306eBean\u4e2d\u306e\u5c5e\u6027 ''{0}'' \u3092\u8aad\u307f\u8fbc\u3080\u30e1\u30bd\u30c3\u30c9\u3092\u767a\u898b\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f
  -jsp.error.beans.nomethod.setproperty=\u30bf\u30a4\u30d7 ''{1}'' \u306eBean\u4e2d\u306e\u5c5e\u6027 ''{0}'' \u3092\u66f8\u304d\u8fbc\u3080\u30e1\u30bd\u30c3\u30c9\u3092\u767a\u898b\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f
  +jsp.error.beans.nomethod.setproperty=\u30bf\u30a4\u30d7 ''{2}'' \u306eBean\u4e2d\u306e\u5c5e\u6027 ''{0}'' \u3092\u66f8\u304d\u8fbc\u3080\u30e1\u30bd\u30c3\u30c9\u3092\u767a\u898b\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f
   jsp.error.beans.noproperty=\u30bf\u30a4\u30d7 ''{1}'' \u306ebean\u4e2d\u306e\u5c5e\u6027 ''{0}'' \u306e\u60c5\u5831\u3092\u767a\u898b\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f
   jsp.error.beans.setproperty.noindexset=\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4ed8\u304d\u306e\u5c5e\u6027\u3092\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093
   jsp.error.include.tag=\u7121\u52b9\u306ajsp:include\u30bf\u30b0\u3067\u3059
  
  
  
  1.6       +16 -14    jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java
  
  Index: JspRuntimeLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JspRuntimeLibrary.java	27 Aug 2002 22:24:42 -0000	1.5
  +++ JspRuntimeLibrary.java	9 Oct 2002 20:21:52 -0000	1.6
  @@ -219,8 +219,8 @@
   					String param, boolean ignoreMethodNF) 
   					throws JasperException
       {
  -        java.lang.reflect.Method method = null;
  -        Class type   = null;
  +        Method method = null;
  +        Class type = null;
           Class propertyEditorClass = null;
   	try {
   	    java.beans.BeanInfo info
  @@ -273,7 +273,8 @@
               } else {
                   throw new JasperException(Constants.getString(
                           "jsp.error.beans.nomethod.setproperty",
  -                        new Object[] {prop, bean.getClass().getName()}));
  +                        new Object[] {prop, type.getName(),
  +				      bean.getClass().getName()}));
               }
           }
       }
  @@ -505,8 +506,7 @@
           }
   	Object value = null;
           try {
  -            java.lang.reflect.Method method = 
  -                    getReadMethod(o.getClass(), prop);
  +            Method method = getReadMethod(o.getClass(), prop);
   	    value = method.invoke(o, null);
           } catch (Exception ex) {
   	    throw new JasperException (ex);
  @@ -644,9 +644,9 @@
   	}	
       }
       
  -    public static java.lang.reflect.Method getWriteMethod(Class beanClass, String prop)
  +    public static Method getWriteMethod(Class beanClass, String prop)
       throws JasperException {
  -	java.lang.reflect.Method method = null;	
  +	Method method = null;	
           Class type = null;
   	try {
   	    java.beans.BeanInfo info
  @@ -678,15 +678,17 @@
               } else {
                   throw new JasperException(Constants.getString(
                           "jsp.error.beans.nomethod.setproperty",
  -                        new Object[] {prop, beanClass.getName()}));
  +                        new Object[] {prop, type.getName(),
  +				      beanClass.getName()}));
               }
           }
           return method;
       }
   
  -    public static java.lang.reflect.Method getReadMethod(Class beanClass, String prop)
  -    throws JasperException {
  -        java.lang.reflect.Method method = null;        
  +    public static Method getReadMethod(Class beanClass, String prop)
  +	    throws JasperException {
  +
  +        Method method = null;        
           Class type = null;
           try {
               java.beans.BeanInfo info
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>