Skip to content

Commit 18d04ff

Browse files
committed
Fixed test
1 parent 78f37f1 commit 18d04ff

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/main/java/org/javawebstack/orm/SQLMapper.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
import org.javawebstack.orm.mapper.TypeMapper;
77

88
import java.lang.reflect.InvocationTargetException;
9-
import java.sql.Date;
109
import java.sql.ResultSet;
1110
import java.sql.SQLException;
12-
import java.sql.Timestamp;
1311
import java.util.ArrayList;
1412
import java.util.HashMap;
1513
import java.util.List;

src/main/java/org/javawebstack/orm/mapper/DefaultMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ public Object mapToJava(Object source, Class<?> type) {
8181
return Enum.valueOf((Class<Enum>) type, (String) source);
8282
if (type.equals(UUID.class))
8383
return UUID.fromString((String) source);
84-
if (type.equals(boolean.class) || type.equals(Boolean.class))
85-
return ((Short) source) == 1;
84+
if (type.equals(boolean.class))
85+
return ((Boolean) source).booleanValue();
8686
if (type.equals(byte.class))
8787
return ((Byte) source).byteValue();
8888
if (type.equals(short.class))

0 commit comments

Comments
 (0)