code formatting
This commit is contained in:
parent
83968cf292
commit
21ae1802e3
@ -24,11 +24,13 @@ public abstract class AbstractEntity {
|
||||
* @return
|
||||
*/
|
||||
public static String trimToNull(String field) {
|
||||
if (field == null)
|
||||
if (field == null) {
|
||||
return field;
|
||||
}
|
||||
field = field.trim();
|
||||
if (field.length() == 0)
|
||||
if (field.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return field;
|
||||
}
|
||||
|
||||
@ -38,8 +40,9 @@ public abstract class AbstractEntity {
|
||||
* @return
|
||||
*/
|
||||
public static String trimToEmpty(String field) {
|
||||
if (field == null)
|
||||
if (field == null) {
|
||||
return "";
|
||||
}
|
||||
field = field.trim();
|
||||
return field;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user