diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2019-05-21 23:20:00 +0200 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2019-05-21 23:20:00 +0200 |
commit | 2704f073aad6deb362707e0311b6275cde7c5e1a (patch) | |
tree | 2ec6d478599b88e3e10865aba424fb3777f25945 /src | |
parent | cd49188aff9ffece51ce8831c961e0faab33fbc8 (diff) | |
download | lombok-2704f073aad6deb362707e0311b6275cde7c5e1a.tar.gz lombok-2704f073aad6deb362707e0311b6275cde7c5e1a.tar.bz2 lombok-2704f073aad6deb362707e0311b6275cde7c5e1a.zip |
Code review + mention in changelog for the improvement to val handling vs. lambdas and conditional (ternary) expressions.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java | 4 | ||||
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchVal.java | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java index 257f5cec..463990d1 100644 --- a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java +++ b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java @@ -845,7 +845,6 @@ public class EclipseHandlerUtil { } public static TypeReference makeType(TypeBinding binding, ASTNode pos, boolean allowCompound) { - if (binding.getClass() == EclipseReflectiveMembers.INTERSECTION_BINDING) { Object[] arr = (Object[]) EclipseReflectiveMembers.reflect(EclipseReflectiveMembers.INTERSECTION_BINDING_TYPES, binding); binding = (TypeBinding) arr[0]; @@ -966,7 +965,8 @@ public class EclipseHandlerUtil { // Finally, add however many nullTypeArgument[] arrays as that are missing, inverse the list, toArray it, and use that as PTR's typeArgument argument. List<TypeReference[]> params = new ArrayList<TypeReference[]>(); - /* Calculate generics */ if(!(binding instanceof RawTypeBinding)) { + /* Calculate generics */ + if (!(binding instanceof RawTypeBinding)) { TypeBinding b = binding; while (true) { boolean isFinalStop = b.isLocalType() || !b.isMemberType() || b.enclosingType() == null; diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java b/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java index 832a25e3..c0c2cea6 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java @@ -1,16 +1,16 @@ /* * Copyright (C) 2010-2019 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 * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |