velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r563963 - /velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/generic/SortTool.java
Date Wed, 08 Aug 2007 17:53:37 GMT
Author: nbubna
Date: Wed Aug  8 10:53:35 2007
New Revision: 563963

URL: http://svn.apache.org/viewvc?view=rev&rev=563963
Log:
fix NPE (found by FindBugs)

Modified:
    velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/generic/SortTool.java

Modified: velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/generic/SortTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/generic/SortTool.java?view=diff&rev=563963&r1=563962&r2=563963
==============================================================================
--- velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/generic/SortTool.java
(original)
+++ velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/generic/SortTool.java
Wed Aug  8 10:53:35 2007
@@ -279,7 +279,7 @@
                     //TODO: make it optional whether or not case is ignored
                     comparison = ((String)left).compareToIgnoreCase((String)right);
                 }
-                else
+                else if (left != null)
                 {
                     comparison = left.compareTo(right);
                 }



Mime
View raw message