Skip to content

Commit cdb0d25

Browse files
committed
Java: Removed redundant cast to Stmt
1 parent 6ef3299 commit cdb0d25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/ql/src/Likely Bugs/Frameworks/JUnit/MockingAllNonPrivateMethodsMeansUnitTestIsTooBig.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class MockitoMockingMethodCall extends MethodCall {
6464
from JUnit4TestMethod testMethod, ClassOrInterface mockedClassOrInterface
6565
where
6666
exists(MockitoMockCall mockCall |
67-
mockCall.getParent+().(Stmt) = testMethod.getBody().getAStmt() and
67+
mockCall.getParent+() = testMethod.getBody().getAStmt() and
6868
mockedClassOrInterface = mockCall.getMockedType() and
6969
// Only flag classes with multiple public methods (2 or more)
7070
count(Method m | m = mockedClassOrInterface.getAMethod() and m.isPublic()) > 1 and

0 commit comments

Comments
 (0)