Browse Source

Do not attempt to set a null object into a primitive type

tags/v1.4.0
James Moger 9 years ago
parent
commit
8b6657a93b
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/main/java/com/iciql/TableDefinition.java

+ 6
- 0
src/main/java/com/iciql/TableDefinition.java View File

@@ -152,6 +152,12 @@ public class TableDefinition<T> {
} else {
o = Utils.convert(o, targetType);
}
if (targetType.isPrimitive() && o == null) {
// do not attempt to set a primitive to null
return;
}
field.set(obj, o);
} catch (IciqlException e) {
throw e;

Loading…
Cancel
Save