You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2018/12/20 16:48:34 UTC

[GitHub] jglick opened a new pull request #844: MissingPropertyExceptionTest.testNullMessage

jglick opened a new pull request #844: MissingPropertyExceptionTest.testNullMessage
URL: https://github.com/apache/groovy/pull/844
 
 
   Otherwise you get errors like
   
   ```
   groovy.lang.MissingPropertyExceptionTest > testNullMessage FAILED
       java.lang.NullPointerException
           at groovy.lang.MissingPropertyException.getMessageWithoutLocationText(MissingPropertyException.java:66)
           at groovy.lang.GroovyRuntimeException.getMessage(GroovyRuntimeException.java:63)
           at java.lang.Throwable.getLocalizedMessage(Throwable.java:391)
           at java.lang.Throwable.toString(Throwable.java:480)
           at junit.framework.Assert.assertNull(Assert.java:268)
           at junit.framework.TestCase.assertNull(TestCase.java:438)
           at groovy.lang.MissingPropertyExceptionTest.testNullMessage(MissingPropertyExceptionTest.java:29)
   ```
   
   it is unclear what null values for `property` and `type` would mean, but there is a constructor explicitly allowing that, and it is illegal for `getMessage`, `toString`, etc. to throw an undeclared NPE.
   
   (A `MissingPropertyException` producing this error was originally observed as a build failure in a Jenkins project, though I do not have the details to know the root cause there.)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services