aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2012-03-27 00:46:26 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2012-03-27 00:46:26 +0200
commit1954c022a401cebdbb090d0b80c4f01d7bc76ec3 (patch)
treef4e524d5d987aa5b79bf44c315d001d2ffbcd0b4
parent48fbf86d5a27bcbafff03046097eb33a927bf6da (diff)
downloadlombok-1954c022a401cebdbb090d0b80c4f01d7bc76ec3.tar.gz
lombok-1954c022a401cebdbb090d0b80c4f01d7bc76ec3.tar.bz2
lombok-1954c022a401cebdbb090d0b80c4f01d7bc76ec3.zip
Whoops, errors during release build. fixed it quickly!
-rw-r--r--src/core/lombok/core/TransformationsUtil.java4
-rw-r--r--src/utils/lombok/eclipse/Eclipse.java8
-rw-r--r--src/utils/lombok/javac/Javac.java8
3 files changed, 11 insertions, 9 deletions
diff --git a/src/core/lombok/core/TransformationsUtil.java b/src/core/lombok/core/TransformationsUtil.java
index e94558f9..7426ae18 100644
--- a/src/core/lombok/core/TransformationsUtil.java
+++ b/src/core/lombok/core/TransformationsUtil.java
@@ -72,10 +72,6 @@ public class TransformationsUtil {
return null;
}
- /** Matches any of the 8 primitive names, such as {@code boolean}. */
- public static final Pattern PRIMITIVE_TYPE_NAME_PATTERN = Pattern.compile(
- "^(boolean|byte|short|int|long|float|double|char)$");
-
/* NB: 'notnull' is not part of the pattern because there are lots of @NotNull annotations out there that are crappily named and actually mean
something else, such as 'this field must not be null _when saved to the db_ but its perfectly okay to start out as such, and a no-args
constructor and the implied starts-out-as-null state that goes with it is in fact mandatory' which happens with javax.validation.constraints.NotNull.
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();
}
/**
diff --git a/src/utils/lombok/javac/Javac.java b/src/utils/lombok/javac/Javac.java
index d97746f1..f4d2b49d 100644
--- a/src/utils/lombok/javac/Javac.java
+++ b/src/utils/lombok/javac/Javac.java
@@ -21,7 +21,7 @@
*/
package lombok.javac;
-import lombok.core.TransformationsUtil;
+import java.util.regex.Pattern;
import com.sun.tools.javac.tree.JCTree.JCExpression;
import com.sun.tools.javac.tree.JCTree.JCFieldAccess;
@@ -36,12 +36,16 @@ public class Javac {
//prevent instantiation
}
+ /** 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 expression (that really ought to refer to a type expression) represents a primitive type.
*/
public static boolean isPrimitive(JCExpression ref) {
String typeName = ref.toString();
- return TransformationsUtil.PRIMITIVE_TYPE_NAME_PATTERN.matcher(typeName).matches();
+ return PRIMITIVE_TYPE_NAME_PATTERN.matcher(typeName).matches();
}
/**