tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources messages.properties
Date Sat, 12 Oct 2002 18:55:30 GMT
luehe       2002/10/12 11:55:30

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        TagLibraryInfoImpl.java Validator.java
               jasper2/src/share/org/apache/jasper/resources
                        messages.properties
  Log:
  Fixed 13553: Jasper incorrectly generating a translation error if a
  tag has both a TEI and variable declarations.
  
  Revision  Changes    Path
  1.17      +5 -13     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TagLibraryInfoImpl.java	9 Oct 2002 18:25:39 -0000	1.16
  +++ TagLibraryInfoImpl.java	12 Oct 2002 18:55:29 -0000	1.17
  @@ -381,8 +381,7 @@
   	variableVector.copyInto(tagVariableInfos);
   
           TagExtraInfo tei = null;
  -
  -        if (teiclass != null && !teiclass.equals(""))
  +        if (teiclass != null && !teiclass.equals("")) {
               try {
                   Class teiClass = ctxt.getClassLoader().loadClass(teiclass);
                   tei = (TagExtraInfo) teiClass.newInstance();
  @@ -408,14 +407,7 @@
                                     Logger.WARNING
                                     );
               }
  -
  -        // JSP.C1: It is a (translation time) error for an action that
  -        // has one or more variable subelements to have a TagExtraInfo
  -        // class that returns a non-null object.
  -
  -        if (tei != null && variableVector.size() != 0) {
  -            err.jspError("jsp.warning.teiclass.is.nonnull", teiclass);
  -        }
  +	}
   
           TagInfo taginfo = new TagInfo(name, tagclass, bodycontent,
                                         info, this, 
  
  
  
  1.41      +14 -3     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java
  
  Index: Validator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- Validator.java	9 Oct 2002 17:41:13 -0000	1.40
  +++ Validator.java	12 Oct 2002 18:55:29 -0000	1.41
  @@ -791,6 +791,17 @@
   	    }
   
   	    TagData tagData = new TagData(tagDataAttrs);
  +
  +	    // JSP.C1: It is a (translation time) error for an action that
  +	    // has one or more variable subelements to have a TagExtraInfo
  +	    // class that returns a non-null object.
  +	    TagExtraInfo tei = tagInfo.getTagExtraInfo();
  +	    if (tei != null && tei.getVariableInfo(tagData) != null
  +		    && tagInfo.getTagVariableInfos() != null) {
  +		err.jspError("jsp.error.non_null_tei_and_var_subelems",
  +			     n.getName());
  +	    }
  +
   	    n.setTagData(tagData);
   	    n.setJspAttributes(jspAttrs);
   
  
  
  
  1.46      +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.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- messages.properties	9 Oct 2002 20:21:52 -0000	1.45
  +++ messages.properties	12 Oct 2002 18:55:30 -0000	1.46
  @@ -132,7 +132,7 @@
   jsp.warning.unknown.element.in.attribute=Warning: Unknown element {0} in attribute
   jsp.error.more.than.one.taglib=More than one taglib in the TLD: {0}
   jsp.warning.teiclass.is.null=Could not load TagExtraInfo class {0}: {1}
  -jsp.warning.teiclass.is.nonnull=variable subelement defined in TLD when TagExtraInfo class
{0} is non-null
  +jsp.error.non_null_tei_and_var_subelems=Tag {0} has one or more variable subelements and
a TagExtraInfo class that returns a non-null object
   jsp.error.parse.error.in.TLD=Parse Error in the tag library descriptor: {0}
   jsp.error.unable.to.open.TLD=Unable to open the tag library descriptor: {0}
   jsp.buffer.size.zero=Buffer size <= 0
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message