tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1037279 [1/10] - in /tomcat/taglibs/standard/trunk/impl: (..)
Date Sat, 20 Nov 2010 23:34:02 GMT
2010/11/20  <jboynes@apache.org>:
> Author: jboynes
> Date: Sat Nov 20 17:57:45 2010
> New Revision: 1037279
>
> URL: http://svn.apache.org/viewvc?rev=1037279&view=rev
> Log:
> reformat code to remove tabs;add checkstyle report
>

http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/xml/XPathUtil.java?limit_changes=0&r1=1037279&r2=1037278&pathrev=1037279

@@ -548,9 +548,9 @@ public class XPathUtil {
                 Vector vector = new Vector();
                 Object resultObject = null;
                 if ( result.getType()== XObject.CLASS_BOOLEAN ) {
-                    resultObject = new Boolean( result.bool());
+                    resultObject = result.bool();
                 } else if ( result.getType()== XObject.CLASS_NUMBER ) {
-                    resultObject = new Double( result.num());
+                    resultObject = result.num();
                 } else if ( result.getType()== XObject.CLASS_STRING ) {
                     resultObject = result.str();
                 }

The formatter fixed implicit boxing.
It'd be better to use Boolean.valueOf() though. I am leaving for
others to fix it (if anybody wants to do that).

It is the only serious code change in this commit.

Best regards,
Konstantin Kolinko

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


Mime
View raw message