mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-30 21:08:30 +08:00
Fixed enum handling in data create
This commit is contained in:
parent
59b6296b9e
commit
0d9ad72b3b
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user