tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kin...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler TagFileProcessor.java
Date Mon, 14 Oct 2002 23:18:58 GMT
kinman      2002/10/14 16:18:58

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        TagFileProcessor.java
  Log:
  - Fix 13619: TagInfo.getAttributes should return null if there is no attributes.
  
  Revision  Changes    Path
  1.30      +13 -9     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagFileProcessor.java
  
  Index: TagFileProcessor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagFileProcessor.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- TagFileProcessor.java	9 Oct 2002 17:41:13 -0000	1.29
  +++ TagFileProcessor.java	14 Oct 2002 23:18:57 -0000	1.30
  @@ -272,13 +272,17 @@
   
               tagclass = Constants.TAG_FILE_PACKAGE_NAME + "." + name;
   
  -            TagVariableInfo[] tagVariableInfos
  -                    = new TagVariableInfo[variableVector.size()];
  -            variableVector.copyInto(tagVariableInfos);
  +            TagVariableInfo[] tagVariableInfos = null;
  +            if (variableVector.size() > 0) {
  +                tagVariableInfos = new TagVariableInfo[variableVector.size()];
  +                variableVector.copyInto(tagVariableInfos);
  +            }
   
  -            TagAttributeInfo[] tagAttributeInfo
  -                    = new TagAttributeInfo[attributeVector.size()];
  -            attributeVector.copyInto(tagAttributeInfo);
  +            TagAttributeInfo[] tagAttributeInfo = null;
  +            if (attributeVector.size() > 0) {
  +                tagAttributeInfo = new TagAttributeInfo[attributeVector.size()];
  +                attributeVector.copyInto(tagAttributeInfo);
  +            }
   
               return new TagInfo(name,
   			       tagclass,
  
  
  

--
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