Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.5
-
None
-
Linux
Description
Reduced code showing the problem: https://gist.github.com/RomanSaveljev/71ed29b0df3eb306485c
In the runtime it fails with:
Caught: java.lang.NullPointerException java.lang.NullPointerException at bug$1.func(bug.groovy:14) at A.<init>(bug.groovy:3) at bug$1.<init>(bug.groovy) at bug.func(bug.groovy:11) at bug.run(bug.groovy:22)
It happens, because inside the overriden method it tries to access locally defined t. I have translated the same code to Java (see the gist) and it works as expected.