Skip to content

Commit

Permalink
refactor: Enum values should be compared with "=="
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek and TeamModerne committed Dec 24, 2024
1 parent 7599254 commit 93a6d77
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public J.Literal visitLiteral(J.Literal literal, ExecutionContext ctx) {
//noinspection ConstantConditions
if (parent instanceof J.MethodInvocation &&
logStatement.matches((J.MethodInvocation) parent) &&
JavaType.Primitive.String.equals(literal.getType()) &&
JavaType.Primitive.String == literal.getType() &&
!literal.getValue().toString().startsWith("<")) {
String value = "<" + randomName.next() + "> " + literal.getValue().toString();
return literal.withValue(value)
Expand Down

0 comments on commit 93a6d77

Please sign in to comment.