luontola / retrolambda

Backport of Java 8's lambda expressions to Java 7, 6 and 5
Apache License 2.0
3.54k stars 227 forks source link

NPE when used with Pitest #131

Closed 8armed-monkey closed 6 years ago

8armed-monkey commented 7 years ago

The detail of the problem could be found here: https://github.com/hcoles/pitest/issues/345

A sample project where the issue occurs could be found here: https://github.com/8armed-monkey/sample-npe-pitest-retrolambda

Class where the lambda is used: test.event.EventBroadcasterImpl.java

The NPE doesn't occur if I change the lambda / method reference to anonymous inner classes (the Retrolambda plugin is still being used, but it doesn't create additional classes).

luontola commented 6 years ago

The ticket hints that this may be related to missing source file debug information. Retrolambda persists the lambda classes that Java 8 generates at runtime, and those classes are missing debug information. It might be possible to add debug information at least for the source file name.

luontola commented 6 years ago

I wonder if #130 is related.

luontola commented 6 years ago

This has been fixed in Retrolambda 2.5.3