From 782daa49979c35cd93139b3cfbc98eafe346f790 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 25 Oct 2011 15:01:28 +0200 Subject: Again made @NotNull have no special meaning. See issues 43, 271, and 287. --- src/utils/lombok/core/TransformationsUtil.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/utils') diff --git a/src/utils/lombok/core/TransformationsUtil.java b/src/utils/lombok/core/TransformationsUtil.java index 3fbfef58..25c3215a 100644 --- a/src/utils/lombok/core/TransformationsUtil.java +++ b/src/utils/lombok/core/TransformationsUtil.java @@ -72,7 +72,11 @@ public class TransformationsUtil { public static final Pattern PRIMITIVE_TYPE_NAME_PATTERN = Pattern.compile( "^(boolean|byte|short|int|long|float|double|char)$"); - public static final Pattern NON_NULL_PATTERN = Pattern.compile("^(?:notnull|nonnull)$", Pattern.CASE_INSENSITIVE); + /* 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. + Various problems with spring have also been reported. See issue #287, issue #271, and issue #43. */ + public static final Pattern NON_NULL_PATTERN = Pattern.compile("^(?:nonnull)$", Pattern.CASE_INSENSITIVE); public static final Pattern NULLABLE_PATTERN = Pattern.compile("^(?:nullable|checkfornull)$", Pattern.CASE_INSENSITIVE); /** -- cgit