SubsetIteratorTag throws NullPointerException when no source is specified
-------------------------------------------------------------------------

                 Key: WW-1932
                 URL: https://issues.apache.org/struts/browse/WW-1932
             Project: Struts 2
          Issue Type: Bug
          Components: Views
    Affects Versions: 2.0.6
         Environment: OS: Windows 2000 
JDK: Sun 1.5.0_10
            Reporter: Jed Alexander
            Priority: Minor


Found error when trying to insert a ww:subset tag inside a ww:sort tag.  Found 
error in line 194 in file  
\trunk\core\src\main\java\org\apache\struts2\views\jsp\iterator\SubsetIteratorTag.java.

Please see below patch for  the fix.

Index: SubsetIteratorTag.java
===================================================================
--- SubsetIteratorTag.java  (revision 539507)
+++ SubsetIteratorTag.java  (working copy)
@@ -194,7 +194,7 @@

         // source
         Object source = null;
-        if (sourceAttr == null && sourceAttr.length() <= 0) {
+        if (sourceAttr == null || sourceAttr.length() <= 0) {
             source = findValue("top");
         } else {
             source = findValue(sourceAttr);


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to