Fixed enum handling in data create

This commit is contained in:
Samppa Saarela 2009-04-24 12:43:34 +00:00
parent 59b6296b9e
commit 0d9ad72b3b

View File

@ -5,6 +5,8 @@
*/
package com.mysema.util;
import org.apache.commons.lang.StringUtils;
/**
* Assert provides
*
@ -16,9 +18,12 @@ public class Assert {
/**
* use notEmpty(String) instead
*/
@Deprecated
public static String hasText(String text) {
return notEmpty(text);
if (StringUtils.isBlank(text)) {
throw new IllegalArgumentException("was blank");
} else {
return text;
}
}
public static <T> T notNull(T object) {