Skip to content

Commit

Permalink
Fixed NPE in TestsShouldNotBePublic (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmck257 authored Jan 24, 2023
1 parent 60a1851 commit 9c9b2c5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ public ClassDeclaration visitClassDeclaration(ClassDeclaration classDecl, Execut
public J.MethodDeclaration visitMethodDeclaration(J.MethodDeclaration method, ExecutionContext executionContext) {
J.MethodDeclaration m = super.visitMethodDeclaration(method, executionContext);

if (method.getMethodType().getDeclaringType().hasFlags(Flag.Abstract, Flag.Public)) {
if (method.getMethodType() == null ||
method.getMethodType().getDeclaringType().hasFlags(Flag.Abstract, Flag.Public)) {
return m;
}

Expand Down

0 comments on commit 9c9b2c5

Please sign in to comment.