You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Jed Alexander (JIRA)" <ji...@apache.org> on 2007/05/18 18:16:42 UTC

[jira] Created: (WW-1932) SubsetIteratorTag throws NullPointerException when no source is specified

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.


[jira] Resolved: (WW-1932) SubsetIteratorTag throws NullPointerException when no source is specified

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown resolved WW-1932.
---------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.8
         Assignee: Don Brown

Fixed, thanks for the patch!

> 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
>         Assigned To: Don Brown
>            Priority: Minor
>             Fix For: 2.0.8
>
>
> 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.