From a9f302cd8f0839ee255742abd4f094e6899afdf9 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Fri, 5 May 2017 15:19:26 -0300 Subject: [PATCH] Removendo else --- .../insula/opes/hibernate/usertype/EmailUserType.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/br/com/insula/opes/hibernate/usertype/EmailUserType.java b/src/main/java/br/com/insula/opes/hibernate/usertype/EmailUserType.java index d0c73dd..5acd95e 100644 --- a/src/main/java/br/com/insula/opes/hibernate/usertype/EmailUserType.java +++ b/src/main/java/br/com/insula/opes/hibernate/usertype/EmailUserType.java @@ -33,11 +33,10 @@ public class EmailUserType extends ImmutableUserType { public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { String value = rs.getString(names[0]); - if (rs.wasNull()) { + if (rs.wasNull()) return null; - } else { - return Email.fromString(value); - } + + return Email.fromString(value); } @Override @@ -61,4 +60,4 @@ public int[] sqlTypes() { return new int[] { Types.VARCHAR }; } -} \ No newline at end of file +}