Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
NPE with retrolambda #345
Hi I am getting the following exception after upgrading to Kotlin v1.1:
I am running it with Gradle:
I'm guessing that Kotlin is now not including source file debug information in one or more classes.
Although it will be easy enough to fix the NPE here this might cause other problems as pitest relies on this debug info to generate the final report.
If you can put together a minimal example that reproduces the problem I can take a look.
Hi, it looks like it might be caused by Retrolambda. The sample project is available here:
First, I was suspecting that Kotlin is somehow leaking into the classpath use but PIT, but it's not the case:
Later on, I realized that you mentioned that the problem occur even in projects which don't use Kotlin (like that one :) ).
The NPE is in the line:
which suggests that a filename is null. I debugged that and the ill-fated object is:
The filename is null, but it shouldn't. The problem may be related to retrolamba.
@8armed-monkey Could you check if the problem occurs also without retrolambda? If not, could you try to use the latest version of retrolambda (2.5.1) to verify that the problem hasn't been already fixed? If not, it would be good to report it :).
@hcoles Maybe it would be good to perform a sanity check of (some) input parameters when
Btw, just in case, as it may not be documented (yet), to debug PIT in a Gradle build it is enough to set:
@szpak The problem 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).
I updated the Retrolambda plugin as well, but the problem is still there. Will report the issue to Retrolambda devs.