Skip to content

Commit

Permalink
Update src/main/java/analyzer/exercises/loglevels/LogLevelsAnalyzer.java
Browse files Browse the repository at this point in the history
Co-authored-by: Sander Ploegsma <[email protected]>
  • Loading branch information
manumafe98 and sanderploegsma authored Feb 21, 2024
1 parent ce6df28 commit 417ce30
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public void visit(MethodDeclaration node, OutputCollector output) {

private static boolean containsHarcodedString(MethodDeclaration node) {
List<StringLiteralExpr> hardcodedStrings = node.findAll(StringLiteralExpr.class,
x -> x.getValue().equals("[ERROR]:") || x.getValue().equals("[WARNING]:")
|| x.getValue().equals("[INFO]:"));
x -> x.getValue().contains("ERROR") || x.getValue().contains("WARNING")
|| x.getValue().contains("INFO"));

return hardcodedStrings.size() > 1;
}
Expand Down

0 comments on commit 417ce30

Please sign in to comment.