From 21ae1802e3ed2012d85fda4c41338bffeb815a9f Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Mon, 21 Jan 2013 13:32:11 +0100 Subject: [PATCH] code formatting --- hsarback/src/de/hsadmin/core/model/AbstractEntity.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hsarback/src/de/hsadmin/core/model/AbstractEntity.java b/hsarback/src/de/hsadmin/core/model/AbstractEntity.java index b93cef6..b6184bb 100644 --- a/hsarback/src/de/hsadmin/core/model/AbstractEntity.java +++ b/hsarback/src/de/hsadmin/core/model/AbstractEntity.java @@ -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; }