Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1314

ExceptionAnalyzer throws NPE when an exception message is null

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

        Hide
        hlship Howard M. Lewis Ship added a comment -

        Thanks for the patch!

        Show
        hlship Howard M. Lewis Ship added a comment - Thanks for the patch!
        Hide
        bpsommerville 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
        bpsommerville 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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development