diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lombok/core/Version.java | 4 | ||||
-rw-r--r-- | src/core/lombok/eclipse/handlers/HandleConstructor.java | 6 | ||||
-rw-r--r-- | src/core/lombok/javac/handlers/HandleConstructor.java | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/core/lombok/core/Version.java b/src/core/lombok/core/Version.java index e2c005d9..8bd39dd4 100644 --- a/src/core/lombok/core/Version.java +++ b/src/core/lombok/core/Version.java @@ -26,8 +26,8 @@ package lombok.core; */ public class Version { // ** CAREFUL ** - this class must always compile with 0 dependencies (it must not refer to any other sources or libraries). - private static final String VERSION = "0.9.4-EDGE"; - private static final String RELEASE_NAME = "burrowing whale"; + private static final String VERSION = "0.10.0-BETA1"; + private static final String RELEASE_NAME = "Burning Emu"; private Version() { //Prevent instantiation diff --git a/src/core/lombok/eclipse/handlers/HandleConstructor.java b/src/core/lombok/eclipse/handlers/HandleConstructor.java index 826d4c1c..f5025b19 100644 --- a/src/core/lombok/eclipse/handlers/HandleConstructor.java +++ b/src/core/lombok/eclipse/handlers/HandleConstructor.java @@ -130,10 +130,12 @@ public class HandleConstructor { for (EclipseNode child : typeNode.down()) { if (child.getKind() != Kind.FIELD) continue; FieldDeclaration fieldDecl = (FieldDeclaration) child.get(); - //Skip fields that start with $ + // Skip fields that start with $ if (fieldDecl.name.length > 0 && fieldDecl.name[0] == '$') continue; - //Skip static fields. + // Skip static fields. if ((fieldDecl.modifiers & ClassFileConstants.AccStatic) != 0) continue; + // Skip initialized final fields. + if (((fieldDecl.modifiers & ClassFileConstants.AccFinal) != 0) && fieldDecl.initialization != null) continue; fields.add(child); } new HandleConstructor().generateConstructor(typeNode, level, fields, staticName, false, suppressConstructorProperties, ast); diff --git a/src/core/lombok/javac/handlers/HandleConstructor.java b/src/core/lombok/javac/handlers/HandleConstructor.java index 3370685e..7f0c2ba6 100644 --- a/src/core/lombok/javac/handlers/HandleConstructor.java +++ b/src/core/lombok/javac/handlers/HandleConstructor.java @@ -130,11 +130,13 @@ public class HandleConstructor { for (JavacNode child : typeNode.down()) { if (child.getKind() != Kind.FIELD) continue; JCVariableDecl fieldDecl = (JCVariableDecl) child.get(); - //Skip fields that start with $ + // Skip fields that start with $ if (fieldDecl.name.toString().startsWith("$")) continue; long fieldFlags = fieldDecl.mods.flags; - //Skip static fields. + // Skip static fields. if ((fieldFlags & Flags.STATIC) != 0) continue; + // Skip initialized final fields. + if (((fieldFlags & Flags.FINAL) != 0) && fieldDecl.init != null) continue; fields.append(child); } new HandleConstructor().generateConstructor(typeNode, level, fields.toList(), staticName, false, suppressConstructorProperties); |