Skip to content

Commit

Permalink
fix(spoon): Handle implicit ctors correct (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt authored Jul 16, 2023
1 parent 5078a48 commit 5452a96
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public List<BadSmell> analyze(CtType<?> clazz) {
}
List<CtConstructor<?>> elements = clazz.getElements(new TypeFilter<>(CtConstructor.class));
for (CtConstructor<?> ctConstructor : elements) {
if (!ctConstructor.isProtected() && ctConstructor.isPublic()) {
if (!ctConstructor.isProtected() && ctConstructor.isPublic() && !ctConstructor.isImplicit()) {
badSmells.add(new NonProtectedConstructorInAbstractClass(clazz, ctConstructor));
}
}
Expand Down

0 comments on commit 5452a96

Please sign in to comment.