Tapestry
  1. Tapestry
  2. TAPESTRY-1314

ExceptionAnalyzer throws NPE when an exception message is null

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.3
    • Fix Version/s: 5.0.3
    • Component/s: tapestry-ioc
    • Labels:
      None
    • Environment:
      Windows XP, Java 5, JBoss 5,

      Description

      When analyzing exceptions if one of the exceptions in the stack has a null message the the exception analyzer throws a NPE (at ExceptionAnalyzerImpl:87)

      To reproduce, cause a NPE when binding a property on a page.
      E.g. In template have <t:textField value="foo.a" > where foo is null in the page class.

      1. TAP-1314.patch
        2 kB
        Ben Sommerville

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12569183 ] jira [ 12592120 ]
        Mark Thomas made changes -
        Workflow jira [ 12398676 ] Default workflow, editable Closed status [ 12569183 ]
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 5.0.3 [ 12312338 ]
        Hide
        Howard M. Lewis Ship added a comment -

        Thanks for the patch!

        Show
        Howard M. Lewis Ship added a comment - Thanks for the patch!
        Ben Sommerville made changes -
        Field Original Value New Value
        Attachment TAP-1314.patch [ 12352533 ]
        Hide
        Ben Sommerville added a comment -

        Patch to prevent NPE.
        Changes construction of ExceptionInfo so that message is stored as empty string when input message is null. This means the ExceptionInfo.getMessage() is always non null, thus preventing NPE when examining it.

        Show
        Ben Sommerville added a comment - Patch to prevent NPE. Changes construction of ExceptionInfo so that message is stored as empty string when input message is null. This means the ExceptionInfo.getMessage() is always non null, thus preventing NPE when examining it.
        Ben Sommerville created issue -

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Ben Sommerville
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development