From 4dd59e07dadb6f0e1bdcfd50ea03a60d9da72f17 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Mon, 8 Jan 2018 22:00:28 +0100 Subject: jdk9 Builder.Default works again. Fixes #1547 --- src/core/lombok/javac/handlers/HandleBuilder.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/core/lombok/javac/handlers/HandleBuilder.java') diff --git a/src/core/lombok/javac/handlers/HandleBuilder.java b/src/core/lombok/javac/handlers/HandleBuilder.java index 420d4b72..725a436e 100644 --- a/src/core/lombok/javac/handlers/HandleBuilder.java +++ b/src/core/lombok/javac/handlers/HandleBuilder.java @@ -554,11 +554,10 @@ public class HandleBuilder extends JavacAnnotationHandler { ListBuffer args = new ListBuffer(); for (BuilderFieldData bfd : builderFields) { if (bfd.nameOfSetFlag != null) { - args.append(maker.Conditional(maker.Ident(bfd.nameOfSetFlag), maker.Ident(bfd.name), - maker.Apply(typeParameterNames(maker, ((JCClassDecl) tdParent.get()).typarams), maker.Select(maker.Ident(((JCClassDecl) tdParent.get()).name), bfd.nameOfDefaultProvider), List.nil()))); - } else { - args.append(maker.Ident(bfd.name)); + statements.append(maker.VarDef(maker.Modifiers(0L), bfd.name, cloneType(maker, bfd.type, source, tdParent.getContext()), maker.Select(maker.Ident(type.toName("this")), bfd.name))); + statements.append(maker.If(maker.Unary(CTC_NOT, maker.Ident(bfd.nameOfSetFlag)), maker.Exec(maker.Assign(maker.Ident(bfd.name),maker.Apply(typeParameterNames(maker, ((JCClassDecl) tdParent.get()).typarams), maker.Select(maker.Ident(((JCClassDecl) tdParent.get()).name), bfd.nameOfDefaultProvider), List.nil()))), null)); } + args.append(maker.Ident(bfd.name)); } if (addCleaning) { -- cgit From 6e7f75eb779196848e1f6d421432a3a885ec8e9a Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 9 Jan 2018 00:54:17 +0100 Subject: Updated copyright notices to 2018. --- buildScripts/website.ant.xml | 2 +- src/core/lombok/javac/JavacResolution.java | 2 +- src/core/lombok/javac/apt/LombokFileObjects.java | 2 +- src/core/lombok/javac/handlers/HandleBuilder.java | 2 +- src/core/lombok/javac/handlers/HandleVal.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/lombok/javac/handlers/HandleBuilder.java') diff --git a/buildScripts/website.ant.xml b/buildScripts/website.ant.xml index 13b97231..36b3a193 100644 --- a/buildScripts/website.ant.xml +++ b/buildScripts/website.ant.xml @@ -223,7 +223,7 @@ such as applying the templates to produce the website, converting the changelog
Lombok - ]]>v${lombok.version}
- Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.]]> + Copyright © 2009-2018 The Project Lombok Authors, licensed under the MIT licence.]]> diff --git a/src/core/lombok/javac/JavacResolution.java b/src/core/lombok/javac/JavacResolution.java index 26ba86c0..8cc239e1 100644 --- a/src/core/lombok/javac/JavacResolution.java +++ b/src/core/lombok/javac/JavacResolution.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2015 The Project Lombok Authors. + * Copyright (C) 2011-2018 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/core/lombok/javac/apt/LombokFileObjects.java b/src/core/lombok/javac/apt/LombokFileObjects.java index 37a0b366..ef735730 100644 --- a/src/core/lombok/javac/apt/LombokFileObjects.java +++ b/src/core/lombok/javac/apt/LombokFileObjects.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2017 The Project Lombok Authors. + * Copyright (C) 2010-2018 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/core/lombok/javac/handlers/HandleBuilder.java b/src/core/lombok/javac/handlers/HandleBuilder.java index 725a436e..d5a342e4 100644 --- a/src/core/lombok/javac/handlers/HandleBuilder.java +++ b/src/core/lombok/javac/handlers/HandleBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2017 The Project Lombok Authors. + * Copyright (C) 2013-2018 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/core/lombok/javac/handlers/HandleVal.java b/src/core/lombok/javac/handlers/HandleVal.java index 8b82fefb..f0f6eb2a 100644 --- a/src/core/lombok/javac/handlers/HandleVal.java +++ b/src/core/lombok/javac/handlers/HandleVal.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2016 The Project Lombok Authors. + * Copyright (C) 2010-2018 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal -- cgit