diff options
author | Rawi01 <Rawi01@users.noreply.github.com> | 2020-08-31 09:57:29 +0200 |
---|---|---|
committer | Rawi01 <Rawi01@users.noreply.github.com> | 2020-08-31 09:57:29 +0200 |
commit | 82ac8aad1d0e3e152db4ce328184c40c73700cee (patch) | |
tree | 3d5abb9072d43b87f19e5faf88a3d09b6c6da8e4 /src/utils/lombok/eclipse/Eclipse.java | |
parent | 3d90a51163354930eeea0e26c2b0a567af8e96be (diff) | |
parent | 9148294f78a8e646ee131ca182a9b692bc028fdb (diff) | |
download | lombok-82ac8aad1d0e3e152db4ce328184c40c73700cee.tar.gz lombok-82ac8aad1d0e3e152db4ce328184c40c73700cee.tar.bz2 lombok-82ac8aad1d0e3e152db4ce328184c40c73700cee.zip |
Merge branch 'master' into extensionmethod
Conflicts:
build.xml
Diffstat (limited to 'src/utils/lombok/eclipse/Eclipse.java')
-rw-r--r-- | src/utils/lombok/eclipse/Eclipse.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/utils/lombok/eclipse/Eclipse.java b/src/utils/lombok/eclipse/Eclipse.java index 31f2518a..31979955 100644 --- a/src/utils/lombok/eclipse/Eclipse.java +++ b/src/utils/lombok/eclipse/Eclipse.java @@ -29,6 +29,7 @@ import java.util.regex.Pattern; import lombok.core.ClassLiteral; import lombok.core.FieldSelect; +import lombok.core.JavaIdentifiers; import lombok.permit.Permit; import org.eclipse.jdt.internal.compiler.ast.ASTNode; @@ -158,16 +159,12 @@ public class Eclipse { return result.toArray(EMPTY_ANNOTATIONS_ARRAY); } - /** Matches any of the 8 primitive names, such as {@code boolean}. */ - private static final Pattern PRIMITIVE_TYPE_NAME_PATTERN = Pattern.compile( - "^(boolean|byte|short|int|long|float|double|char)$"); - /** * Checks if the given type reference represents a primitive type. */ public static boolean isPrimitive(TypeReference ref) { if (ref.dimensions() > 0) return false; - return PRIMITIVE_TYPE_NAME_PATTERN.matcher(toQualifiedName(ref.getTypeName())).matches(); + return JavaIdentifiers.isPrimitive(toQualifiedName(ref.getTypeName())); } /** |