From 1954c022a401cebdbb090d0b80c4f01d7bc76ec3 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 27 Mar 2012 00:46:26 +0200 Subject: Whoops, errors during release build. fixed it quickly! --- src/utils/lombok/eclipse/Eclipse.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/utils/lombok/eclipse/Eclipse.java') diff --git a/src/utils/lombok/eclipse/Eclipse.java b/src/utils/lombok/eclipse/Eclipse.java index 7d21faa2..c1bd95c3 100644 --- a/src/utils/lombok/eclipse/Eclipse.java +++ b/src/utils/lombok/eclipse/Eclipse.java @@ -26,8 +26,6 @@ import java.util.Arrays; import java.util.List; import java.util.regex.Pattern; -import lombok.core.TransformationsUtil; - import org.eclipse.jdt.internal.compiler.ast.ASTNode; import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration; import org.eclipse.jdt.internal.compiler.ast.Annotation; @@ -135,12 +133,16 @@ 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 TransformationsUtil.PRIMITIVE_TYPE_NAME_PATTERN.matcher(toQualifiedName(ref.getTypeName())).matches(); + return PRIMITIVE_TYPE_NAME_PATTERN.matcher(toQualifiedName(ref.getTypeName())).matches(); } /** -- cgit