You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by ho...@apache.org on 2004/06/12 02:33:56 UTC

cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv JstlCoreTLV.java JstlXmlTLV.java

horwat      2004/06/11 17:33:56

  Modified:    standard/src/org/apache/taglibs/standard/lang/jpath/adapter
                        Tag: STANDARD_1_0_BRANCH Convert.java
               standard/src/org/apache/taglibs/standard/tlv Tag:
                        STANDARD_1_0_BRANCH JstlCoreTLV.java
                        JstlXmlTLV.java
  Log:
  Bugzilla #16773
  
    - Substituted static values where Boolean objects were created.
    - changes applied to 1.0.x workspace
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.1.1.2.3 +9 -9      jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jpath/adapter/Attic/Convert.java
  
  Index: Convert.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jpath/adapter/Attic/Convert.java,v
  retrieving revision 1.1.1.1.2.2
  retrieving revision 1.1.1.1.2.3
  diff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3
  --- Convert.java	28 Feb 2004 06:08:05 -0000	1.1.1.1.2.2
  +++ Convert.java	12 Jun 2004 00:33:56 -0000	1.1.1.1.2.3
  @@ -90,7 +90,7 @@
           Boolean converted;
           o = performBasicConversions(o);
           if (o == null) {
  -            converted = new Boolean(false);
  +            converted = Boolean.FALSE;
           } else if (o instanceof Boolean) {
               converted = toBoolean((Boolean)o);
           } else if (o instanceof Double) {
  @@ -116,11 +116,11 @@
       private static Boolean toBoolean(Double d) throws ConversionException {
           Boolean converted;
           if (d == null) {
  -            converted = new Boolean(false);
  +            converted = Boolean.FALSE;
           } else if (!d.isNaN() && d.doubleValue() != 0 && d.doubleValue() != -0) {
  -            converted = new Boolean(true);
  +            converted = Boolean.TRUE;
           } else {
  -            converted = new Boolean(false);
  +            converted = Boolean.FALSE;
           }
           return converted;
       }
  @@ -128,11 +128,11 @@
       private static Boolean toBoolean(String s) throws ConversionException {
           Boolean converted;
           if (s == null) {
  -            converted = new Boolean(false);
  +            converted = Boolean.FALSE;
           } else if (s.length() != 0) {
  -            converted = new Boolean(true);
  +            converted = Boolean.TRUE;
           } else {
  -            converted = new Boolean(false);
  +            converted = Boolean.FALSE;
           }
           return converted;
       }
  @@ -146,14 +146,14 @@
       private static Boolean toBoolean(JSPList list) throws ConversionException {
           Boolean converted;
           if (list == null || !list.hasNext()) {
  -            converted = new Boolean(false);
  +            converted = Boolean.FALSE;
           } else {
               if (list.getPosition() != 0) {
                   throw new ConversionException("cannot convert a list to "
                           + "a Boolean if the list is not at the starting "
                           + "position" );
               }
  -            converted = new Boolean(true);
  +            converted = Boolean.TRUE;
           }
           return converted;
       }
  
  
  
  No                   revision
  No                   revision
  1.19.2.4  +4 -4      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlCoreTLV.java
  
  Index: JstlCoreTLV.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlCoreTLV.java,v
  retrieving revision 1.19.2.3
  retrieving revision 1.19.2.4
  diff -u -r1.19.2.3 -r1.19.2.4
  --- JstlCoreTLV.java	28 Feb 2004 06:08:13 -0000	1.19.2.3
  +++ JstlCoreTLV.java	12 Jun 2004 00:33:56 -0000	1.19.2.4
  @@ -171,7 +171,7 @@
   		// mark <choose> for the first the first <when>
   		if (isCoreTag(ns, ln, WHEN)) {
   		    chooseHasWhen.pop();
  -		    chooseHasWhen.push(new Boolean(true));
  +		    chooseHasWhen.push(Boolean.TRUE);
   		}
   
   		// ensure <choose> has the right children
  @@ -187,7 +187,7 @@
   		}
   		if (isCoreTag(ns, ln, OTHERWISE)) {
   		    chooseHasOtherwise.pop();
  -		    chooseHasOtherwise.push(new Boolean(true));
  +		    chooseHasOtherwise.push(Boolean.TRUE);
   		}
   
   	    }
  @@ -216,8 +216,8 @@
   	    // we're a choose, so record new choose-specific state
   	    if (isCoreTag(ns, ln, CHOOSE)) {
   		chooseDepths.push(new Integer(depth));
  -		chooseHasWhen.push(new Boolean(false));
  -		chooseHasOtherwise.push(new Boolean(false));
  +		chooseHasWhen.push(Boolean.FALSE);
  +		chooseHasOtherwise.push(Boolean.FALSE);
   	    }
   
   	    // if we're introducing a URL-related tag, record it
  
  
  
  1.13.2.4  +4 -4      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlXmlTLV.java
  
  Index: JstlXmlTLV.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlXmlTLV.java,v
  retrieving revision 1.13.2.3
  retrieving revision 1.13.2.4
  diff -u -r1.13.2.3 -r1.13.2.4
  --- JstlXmlTLV.java	28 Feb 2004 06:08:13 -0000	1.13.2.3
  +++ JstlXmlTLV.java	12 Jun 2004 00:33:56 -0000	1.13.2.4
  @@ -166,7 +166,7 @@
                   // mark <choose> for the first the first <when>
                   if (isXmlTag(ns, ln, WHEN)) {
                       chooseHasWhen.pop();
  -                    chooseHasWhen.push(new Boolean(true));
  +                    chooseHasWhen.push(Boolean.TRUE);
                   }
   
   		// ensure <choose> has the right children
  @@ -182,7 +182,7 @@
   		}
   		if (isXmlTag(ns, ln, OTHERWISE)) {
   		    chooseHasOtherwise.pop();
  -		    chooseHasOtherwise.push(new Boolean(true));
  +		    chooseHasOtherwise.push(Boolean.TRUE);
   		}
   
   	    }
  @@ -204,8 +204,8 @@
   	    // we're a choose, so record new choose-specific state
   	    if (isXmlTag(ns, ln, CHOOSE)) {
   		chooseDepths.push(new Integer(depth));
  -                chooseHasWhen.push(new Boolean(false));
  -		chooseHasOtherwise.push(new Boolean(false));
  +                chooseHasWhen.push(Boolean.FALSE);
  +		chooseHasOtherwise.push(Boolean.FALSE);
   	    }
   
   	    // set up a check against illegal attribute/body combinations
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org