|
List Info
Thread: Updated: (STR-2996) ImportAttributeTag throws a NullPointerException when ignore=true and the
|
|
| Updated: (STR-2996) ImportAttributeTag
throws a NullPointerException when
ignore=true and the |

|
2007-01-25 16:26:16 |
|
|
[ https://issues.apache.org/struts/browse/STR-2996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell updated STR-2996:
-------------------------------
Attachment: STR-2996-fix.patch
Seems like an open and shut case, so here's a patch for the fix.
> ImportAttributeTag throws a NullPointerException when ignore=true and the attribute value is not available
> ----------------------------------------------------------------------------------------------------------
>
> Key: STR-2996
> URL: https://issues.apache.org/struts/browse/STR-2996
> Project: Struts 1
> Issue Type: Bug
> Components: Tiles
> Affects Versions: 1.3.5
> Environment: All
> Reporter: Josh Landin
> Assigned To: Don Brown
> Attachments: STR-2996-fix.patch
>
>
> This bug is from regression caused by the fix for STR-2809.
> Given the JSP with:
>
> The following exception occurs:
> java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:393)
> at org.apache.jasper.runtime.PageContextImpl.setAttribute(PageContextImpl.java:238)
> at org.apache.struts.tiles.taglib.ImportAttributeTag.doStartTag(ImportAttributeTag.java:167)
> This is due to the ImportAttributeTag class incorrectly calling pageContext.setAttribute with a null value. This call was previously unreachable prior to the fix for STR-2809 which eliminated the SKIP_BODY returns when ignore=true.
> The behavior of the PageContext implementation is consistent with the Servlet 2.2 Specification:
> http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/jsp/PageContext.html#setAttribute(java.lang.String,%20java.lang.Object,%20int)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|
[1]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|