Skip to content

Commit 2e04ef6

Browse files
Update src/main/java/org/openrewrite/java/migrate/lombok/LombokUtils.java
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 2716b85 commit 2e04ef6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/openrewrite/java/migrate/lombok/LombokUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ public static boolean isEffectivelySetter(J.MethodDeclaration method) {
161161

162162
return
163163
// assigned value is exactly the parameter
164-
assignment.getAssignment().toString().equals(paramName)
165-
166-
// type of parameter and field have to match
164+
assignment.getAssignment().toString().equals(paramName) // type of parameter and field have to match
165+
&&
166+
param.getType().equals(fieldAccess.getType());
167167
&& param.getType().equals(fieldAccess.getType());
168168

169169
}

0 commit comments

Comments
 (0)