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
Non-existent (invisible?) static analysis block shows 75% code coverage #1087
Comments
Your code uses the
This is a know limitation. The workaround is to not use |
Duplicate #613. |
I've flagged the method that uses assert with a |
Another question wrt to the Google Group: I can't seem to create a new thread online. Is the only way to do it is email the group, instead? |
@Fernal73 The method as such will be excluded due to the |
Thanks for clearing that up. I wasn't aware that it's a static initialiser. Evidently, I'm not familiar with java byte code. I had removed the assert statement earlier but then felt it's a good idea to push it into a |
@Fernal73 Not true, JDK nowadays provides APIs for this, for example |
I discovered this excellent explanation on StackOverflow. |
From StackOverflow Question
Steps to reproduce
Expected behaviour
No static block or incomplete coverage for class expected.
Actual behaviour
50% code coverage displayed for static block (not visible).
The text was updated successfully, but these errors were encountered: