-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error calculating coverage because of NPE in readClasspathManifest #822
Comments
With matching "classpath*.jar" file name. Fixes hcoles#822.
I investigated that topic. Initially, I was a little bit surprised as using a file to pass classpath to PIT (which seems to throw NPE) is not enabled by default in the Gradle plugin. However, it turned out that internally it is used by default anyway. The problem here is caused by the fact that there is:
on the classpath. It is caught by: pitest/pitest/src/main/java/org/pitest/classpath/ClassPath.java Lines 140 to 144 in fab8ddf
It effectively fails down the line on reading information from that JAR:
While using a file to pass the classpath elements seems to be a good idea in general, but the file prefix should be more unique (unless the whole name/path is passed in some other way):
I created #823, but maybe @hcoles will want to fix it in the more sophisticated way. As a workaround, I propose to use a SNAPSHOT built from by branch. I don't know if there is any workaround available in the current version (excluding temporal removing that dependency or its local re-release it with different name).
|
Thanks @szpak , it works fine with a SNAPSHOT build from your branch! |
With matching "classpath*.jar" file name. Fixes #822.
@hcoles, it seems that this issue was fixed for a time but in commit 7876f3c9723e6072e7968282f62027ab677e456f, file |
@iadcode Thanks for digging into this. No, that was not intentional and is very concerning. That commit was meant to just be uninteresting static analysis fixes, I can't imagine how it reverted something. I'll revert that change and go through the rest of it. |
Upgrade sbt to 1.5.3
I'm using the Gradle plugin version 1.5.2 to run pitest in a Junit5 project. I've configured pitest only in one sub-project for now (see the end of the issue for repro).
It seems like the tests are running, but something messes up the code coverage calculation.
If you'd like to reproduce this failure:
You can see the most recent commit to see the changes I introduced.
Thanks!
The text was updated successfully, but these errors were encountered: