ICEfaces
  1. ICEfaces
  2. ICE-8807

DOMResponseWriter.writeText NPE from null text

    Details

      Description

      DOMResponseWriter.writeText does a null reference check on the text parameter passed in, and accordingly throws a NPE. At first glance it might appear that it could simply ignore the lack of text, but looking at ResponseWriter.writeText's JavaDoc, it's clear that this contract is in place, and so DOMResponseWriter is obligated to do what it's doing.

      So, the onus falls on the callers to not call this method with a null text parameter. From auditing the ICEfaces code-base, many unchecked uses exist throughout the ACE and compat component code. Some uses do employ null checking, but they are in the minority. Each use needs to be fixed.

        Activity

        Mark Collette created issue -
        Mark Collette made changes -
        Field Original Value New Value
        Assignee Mark Collette [ mark.collette ]
        Ken Fyten made changes -
        Assignee Priority P1 [ 10010 ]
        Ken Fyten made changes -
        Assignee Mark Collette [ mark.collette ] yip.ng [ yip.ng ]
        Assignee Priority P1 [ 10010 ] P2 [ 10011 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #33583 Fri Feb 22 15:52:40 MST 2013 yip.ng ICE-8807: DOMResponseWriter.writeText NPE from null text.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/autocompleteentry/AutoCompleteEntryRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/renderkit/dom_html_basic/OutputTextRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/selectmenu/SelectMenuRenderer.java
        Hide
        yip.ng added a comment - - edited

        88 usages, but only 3 files needed changing. All other cases are for certain not null: string literals, JS calls, JSON builder output, already null check at or before writeText(), value assigned or returned would never be null, etc.

        M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\autocompleteentry\AutoCompleteEntryRenderer.java#33583
        M: C:\svn\ossrepo\icefaces3\trunk\icefaces\compat\core\src\main\java\com\icesoft\faces\renderkit\dom_html_basic\OutputTextRenderer.java#33583
        M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\selectmenu\SelectMenuRenderer.java#33583

        Show
        yip.ng added a comment - - edited 88 usages, but only 3 files needed changing. All other cases are for certain not null: string literals, JS calls, JSON builder output, already null check at or before writeText(), value assigned or returned would never be null, etc. M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\autocompleteentry\AutoCompleteEntryRenderer.java#33583 M: C:\svn\ossrepo\icefaces3\trunk\icefaces\compat\core\src\main\java\com\icesoft\faces\renderkit\dom_html_basic\OutputTextRenderer.java#33583 M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\selectmenu\SelectMenuRenderer.java#33583
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            yip.ng
            Reporter:
            Mark Collette
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: