aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2018-10-15 22:37:18 +0200
committerRoel Spilker <r.spilker@gmail.com>2018-10-15 22:37:37 +0200
commit7ee4ebb1a5cd2a002dc522604303b1291a46bddb (patch)
treeeea73da20cf3ff2cea9ab3c6de68c5c0d63838c3 /src/core
parent11322a489bb1428c773c6838e58dcd96c5d7422a (diff)
downloadlombok-7ee4ebb1a5cd2a002dc522604303b1291a46bddb.tar.gz
lombok-7ee4ebb1a5cd2a002dc522604303b1291a46bddb.tar.bz2
lombok-7ee4ebb1a5cd2a002dc522604303b1291a46bddb.zip
Don't initialize already initialized final fields. Fixes #1829.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleConstructor.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleConstructor.java b/src/core/lombok/eclipse/handlers/HandleConstructor.java
index cb07115a..82859e4b 100644
--- a/src/core/lombok/eclipse/handlers/HandleConstructor.java
+++ b/src/core/lombok/eclipse/handlers/HandleConstructor.java
@@ -484,6 +484,7 @@ public class HandleConstructor {
for (EclipseNode node : type.down()) {
if (node.getKind() != Kind.FIELD) continue top;
FieldDeclaration fd = (FieldDeclaration) node.get();
+ if (fd.initialization != null) continue top;
if ((fd.modifiers & ClassFileConstants.AccFinal) == 0) continue top;
if ((fd.modifiers & ClassFileConstants.AccStatic) != 0) continue top;
for (EclipseNode ftp : fieldsToParam) if (node == ftp) continue top;