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