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
Two unit tests for SuppressionCommentFilterTest do not fail if CheckstyleException is not thrown #5210
@MEZk Look at the snippet you gave. It does contain an assert statement in the catch. Technically it does contain a verify in the try. The problem is a try/catch needs a fail in the try. For tests there is no need to catch exceptions if they are not examined and should be passed up the chain so the main junit runner gets it.
referenced this issue
Oct 26, 2017
These are the 32 violations produced by the custom check at sevntu-checkstyle/sevntu.checkstyle#619 :
This is a false positive because it is inside a lambda and the method throws a checked exception.
If you don't have the catch, it won't compile with the error
I will update the check to ignore this situation.