tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pier...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler TagBeginGenerator.java
Date Thu, 21 Sep 2000 18:06:00 GMT
pierred     00/09/21 11:05:59

  Modified:    jasper/src/share/org/apache/jasper/compiler
                        TagBeginGenerator.java
  Log:
  Moved the code to catch a null method to its proper location.
  
  Revision  Changes    Path
  1.2       +6 -8      jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagBeginGenerator.java
  
  Index: TagBeginGenerator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagBeginGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TagBeginGenerator.java	2000/08/12 00:52:08	1.1
  +++ TagBeginGenerator.java	2000/09/21 18:05:58	1.2
  @@ -193,6 +193,12 @@
                   if (attrValue != null) {
   		    String attrName = attributes[i].getName();
   		    Method m = tc.getSetterMethod(attrName);
  +		    if (m == null)
  +			throw new CompileException
  +			    (start, Constants.getString
  +			     ("jsp.error.unable.to_find_method",
  +			      new Object[] { attrName }));
  +
                       Class c[] = m.getParameterTypes();
                       // assert(c.length > 0)
   
  @@ -203,14 +209,6 @@
                               attrValue = convertString(c[0], attrValue, writer, attrName);
   		    } else
   			attrValue = convertString(c[0], attrValue, writer, attrName);
  -
  -
  -		    if (m == null)
  -			throw new CompileException
  -			    (start, Constants.getString
  -			     ("jsp.error.unable.to_find_method",
  -			      new Object[] { attrName }));
  -
   		    writer.println(thVarName+"."+m.getName()+"("+attrValue+");");
                   }
               }
  
  
  

Mime
View raw message