#228 - TemplateVariable now correctly rejects invalid parameters.

This commit is contained in:
Oliver Gierke
2014-08-22 17:14:42 +02:00
parent eedd4f06df
commit 0bb2216502
2 changed files with 35 additions and 3 deletions

View File

@@ -56,9 +56,9 @@ public final class TemplateVariable implements Serializable {
*/
public TemplateVariable(String name, TemplateVariable.VariableType type, String description) {
Assert.hasText("Variable name must not be null or empty!");
Assert.notNull("Variable type must not be null!");
Assert.notNull("Description must not be null!");
Assert.hasText(name, "Variable name must not be null or empty!");
Assert.notNull(type, "Variable type must not be null!");
Assert.notNull(description, "Description must not be null!");
this.name = name;
this.type = type;