@@ -40,29 +40,24 @@ public final class Condition {
40
40
/**
41
41
* Creates a new {@link Condition}.
42
42
*
43
- * @param name A non-null, non-empty, and unique name of this condition.
43
+ * @param name A non-null, non-empty, and unique name of this condition.
44
44
* @param expression A non-null and non-empty expression of this condition.
45
45
*/
46
46
public Condition (@ NonNull String name , @ NonNull String expression ) {
47
- checkArgument (!Strings .isNullOrEmpty (name ), "condition name must not be null or empty" );
48
- checkArgument (!Strings .isNullOrEmpty (expression ),
49
- "condition expression must not be null or empty" );
50
- this .name = name ;
51
- this .expression = expression ;
47
+ this (name , expression , null );
52
48
}
53
49
54
50
/**
55
51
* Creates a new {@link Condition}.
56
52
*
57
- * @param name A non-null, non-empty, and unique name of this condition.
53
+ * @param name A non-null, non-empty, and unique name of this condition.
58
54
* @param expression A non-null and non-empty expression of this condition.
59
- * @param tagColor A non-null tag color of this condition.
55
+ * @param tagColor A tag color of this condition.
60
56
*/
61
- public Condition (@ NonNull String name , @ NonNull String expression , @ NonNull TagColor tagColor ) {
57
+ public Condition (@ NonNull String name , @ NonNull String expression , @ Nullable TagColor tagColor ) {
62
58
checkArgument (!Strings .isNullOrEmpty (name ), "condition name must not be null or empty" );
63
59
checkArgument (!Strings .isNullOrEmpty (expression ),
64
60
"condition expression must not be null or empty" );
65
- checkNotNull (tagColor , "condition tag color must not be null" );
66
61
this .name = name ;
67
62
this .expression = expression ;
68
63
this .tagColor = tagColor ;
0 commit comments