From 7d42d8c6201f640c8f7112dc2132908ace12fdc7 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Tue, 16 May 2017 00:35:16 +0200 Subject: [i1351] Warning on initialized non-final field in Builder was wrong --- src/core/lombok/eclipse/handlers/HandleBuilder.java | 2 +- src/core/lombok/javac/handlers/HandleBuilder.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/lombok') diff --git a/src/core/lombok/eclipse/handlers/HandleBuilder.java b/src/core/lombok/eclipse/handlers/HandleBuilder.java index d631f68b..5f2e8fe3 100644 --- a/src/core/lombok/eclipse/handlers/HandleBuilder.java +++ b/src/core/lombok/eclipse/handlers/HandleBuilder.java @@ -211,7 +211,7 @@ public class HandleBuilder extends EclipseAnnotationHandler { if (fd.initialization != null && isDefault == null) { if (isFinal) continue; - fieldNode.addWarning("@Builder will ignore the initializing expression entirely. If you want the initializing expression to serve as default, add @Builder.Default. if it is not supposed to be settable during building, add @Builder.Constant."); + fieldNode.addWarning("@Builder will ignore the initializing expression entirely. If you want the initializing expression to serve as default, add @Builder.Default. If it is not supposed to be settable during building, make the field final."); } if (isDefault != null) { diff --git a/src/core/lombok/javac/handlers/HandleBuilder.java b/src/core/lombok/javac/handlers/HandleBuilder.java index 7ed8b217..157828a0 100644 --- a/src/core/lombok/javac/handlers/HandleBuilder.java +++ b/src/core/lombok/javac/handlers/HandleBuilder.java @@ -165,7 +165,7 @@ public class HandleBuilder extends JavacAnnotationHandler { if (fd.init != null && isDefault == null) { if (isFinal) continue; - fieldNode.addWarning("@Builder will ignore the initializing expression entirely. If you want the initializing expression to serve as default, add @Builder.Default. if it is not supposed to be settable during building, add @Builder.Constant."); + fieldNode.addWarning("@Builder will ignore the initializing expression entirely. If you want the initializing expression to serve as default, add @Builder.Default. If it is not supposed to be settable during building, make the field final."); } if (isDefault != null) { -- cgit