diff --git a/src/main/java/org/openrewrite/java/migrate/javax/AddJaxwsRuntime.java b/src/main/java/org/openrewrite/java/migrate/javax/AddJaxwsRuntime.java index 17ae312a7..e53e5aa3f 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/AddJaxwsRuntime.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/AddJaxwsRuntime.java @@ -231,7 +231,7 @@ public Xml.Document visitDocument(Xml.Document document, ExecutionContext ctx) { for (ResolvedDependency dependency : entry.getValue()) { if (groupId.equals(dependency.getGroupId()) && artifactId.equals(dependency.getArtifactId())) { maxScope = Scope.maxPrecedence(maxScope, entry.getKey()); - if (Scope.Compile.equals(maxScope)) { + if (Scope.Compile == maxScope) { return maxScope; } break; diff --git a/src/main/java/org/openrewrite/java/migrate/lang/var/DeclarationCheck.java b/src/main/java/org/openrewrite/java/migrate/lang/var/DeclarationCheck.java index 74e835f51..3513b00a9 100644 --- a/src/main/java/org/openrewrite/java/migrate/lang/var/DeclarationCheck.java +++ b/src/main/java/org/openrewrite/java/migrate/lang/var/DeclarationCheck.java @@ -55,7 +55,7 @@ private static boolean isSingleVariableDefinition(J.VariableDeclarations vd) { TypeTree typeExpression = vd.getTypeExpression(); boolean definesSingleVariable = vd.getVariables().size() == 1; - boolean isPureAssigment = JavaType.Primitive.Null.equals(vd.getType()); + boolean isPureAssigment = JavaType.Primitive.Null == vd.getType(); if (!definesSingleVariable || isPureAssigment) { return false; } diff --git a/src/main/java/org/openrewrite/java/migrate/lang/var/UseVarForPrimitive.java b/src/main/java/org/openrewrite/java/migrate/lang/var/UseVarForPrimitive.java index ec62f8e51..d7a5cdc35 100644 --- a/src/main/java/org/openrewrite/java/migrate/lang/var/UseVarForPrimitive.java +++ b/src/main/java/org/openrewrite/java/migrate/lang/var/UseVarForPrimitive.java @@ -117,11 +117,11 @@ private Expression expandWithPrimitivTypeHint(J.VariableDeclarations vd, Express return initializer; } - boolean isLongLiteral = JavaType.Primitive.Long.equals(vd.getType()); + boolean isLongLiteral = JavaType.Primitive.Long == vd.getType(); boolean inferredAsLong = valueSource.endsWith("l") || valueSource.endsWith("L"); - boolean isFloatLiteral = JavaType.Primitive.Float.equals(vd.getType()); + boolean isFloatLiteral = JavaType.Primitive.Float == vd.getType(); boolean inferredAsFloat = valueSource.endsWith("f") || valueSource.endsWith("F"); - boolean isDoubleLiteral = JavaType.Primitive.Double.equals(vd.getType()); + boolean isDoubleLiteral = JavaType.Primitive.Double == vd.getType(); boolean inferredAsDouble = valueSource.endsWith("d") || valueSource.endsWith("D") || valueSource.contains("."); String typNotation = null; diff --git a/src/main/java/org/openrewrite/java/migrate/lombok/LombokValueToRecord.java b/src/main/java/org/openrewrite/java/migrate/lombok/LombokValueToRecord.java index 0e10746df..6f2a7ecce 100644 --- a/src/main/java/org/openrewrite/java/migrate/lombok/LombokValueToRecord.java +++ b/src/main/java/org/openrewrite/java/migrate/lombok/LombokValueToRecord.java @@ -117,7 +117,7 @@ public J.ClassDeclaration visitClassDeclaration(J.ClassDeclaration classDecl, Ex private boolean isRelevantClass(J.ClassDeclaration classDeclaration) { List allAnnotations = classDeclaration.getAllAnnotations(); return classDeclaration.getType() != null && - !J.ClassDeclaration.Kind.Type.Record.equals(classDeclaration.getKind()) && + J.ClassDeclaration.Kind.Type.Record != classDeclaration.getKind() && hasMatchingAnnotations(classDeclaration) && !hasGenericTypeParameter(classDeclaration) && classDeclaration.getBody().getStatements().stream().allMatch(this::isRecordCompatibleField) &&