mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
No effective change - code cleanup - simplify if
This commit is contained in:
1 parent
069b83b78d
commit
53cf6c162c
8 files changed
+17
-71
No files matched your search
@@ -9,15 +9,7 @@ public class DmlUtil {
|
||||
/**
|
||||
* Return true if the value is null or a Numeric 0 (for primitive int's and long's) or Option empty.
|
||||
*/
|
||||
public static boolean isNullOrZero(Object value){
|
||||
if (value == null){
|
||||
return true;
|
||||
}
|
||||
|
||||
if (value instanceof Number){
|
||||
return ((Number)value).longValue() == 0l;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public static boolean isNullOrZero(Object value) {
|
||||
return value == null || value instanceof Number && ((Number) value).longValue() == 0l;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user