craigmcc    01/09/06 17:18:49

  Modified:    .        RELEASE-PLAN-4.0.txt
               jasper/src/share/org/apache/jasper/compiler
                        TagBeginGenerator.java
  Log:
  Fix two bugs in the generated code for custom tag attributes:
  * If the property type is char or Character, correctly deal with a single
    character string to be converted.
  * If the property type is short, correctly include a cast in the
    generated string value.
  
  PR: Bugzilla #3366 and #3381
  Submitted by: Simon Brown <[EMAIL PROTECTED]>
  Reviewed by:  Kin-Man Chung <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.7       +3 -5      jakarta-tomcat-4.0/RELEASE-PLAN-4.0.txt
  
  Index: RELEASE-PLAN-4.0.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-PLAN-4.0.txt,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RELEASE-PLAN-4.0.txt      2001/09/06 20:10:29     1.6
  +++ RELEASE-PLAN-4.0.txt      2001/09/07 00:18:49     1.7
  @@ -1,4 +1,4 @@
  -$Id: RELEASE-PLAN-4.0.txt,v 1.6 2001/09/06 20:10:29 craigmcc Exp $
  +$Id: RELEASE-PLAN-4.0.txt,v 1.7 2001/09/07 00:18:49 craigmcc Exp $
   
                         Release Plan for Apache Tomcat 4.0
                         ==================================
  @@ -95,10 +95,6 @@
   
   Catalina    3194    Javadoc errors during build
   
  -Catalina    3285    Tomcat 4.0-b5 class loader fails on IBM JDK
  -
  -Catalina    3293    Allow content lengths > 2^31
  -
   Catalina    3434    NT/2K Service installation on JDK 1.4 b2 fails 
   
   Jasper      3055    <jsp:plugin> tag ignores the name attribute
  @@ -125,6 +121,8 @@
   Catalina    2570    Add ability to configure a default error handler
   
   Catalina    2823    Allow a <Manager> inside <DefaultContext>
  +
  +Catalina    3293    Allow content lengths > 2^31
   
   Jasper      2500    FileNotFoundException unintentionally caught
   
  
  
  
  1.15      +3 -3      
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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TagBeginGenerator.java    2001/07/23 19:57:32     1.14
  +++ TagBeginGenerator.java    2001/09/07 00:18:49     1.15
  @@ -260,7 +260,7 @@
               return "new Byte((byte)" + Byte.valueOf(s).toString() + ")";
           } else if (c == char.class) {
               // non-normative, because a normative method would fail to compile
  -            if (s.length() > 1) {
  +            if (s.length() > 0) {
                   char ch = s.charAt(0);
                   // this trick avoids escaping issues
                   return "((char) " + (int) ch + ")";
  @@ -271,7 +271,7 @@
               }
           } else if (c == Character.class) {
               // non-normative, because a normative method would fail to compile
  -            if (s.length() > 1) {
  +            if (s.length() > 0) {
                   char ch = s.charAt(0);
                   // this trick avoids escaping issues
                   return "new Character((char) " + (int) ch + ")";
  @@ -293,7 +293,7 @@
           } else if (c == Integer.class) {
               return "new Integer(" + Integer.valueOf(s).toString() + ")";
           } else if (c == short.class) {
  -            return Short.valueOf(s).toString();
  +            return "((short) " + Short.valueOf(s).toString() + ")";
           } else if (c == Short.class) {
               return "new Short(" + Short.valueOf(s).toString() + ")";
           } else if (c == long.class) {
  
  
  

Reply via email to