Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Reported by Jesse Glick( https://github.com/jglick )
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.)