Skip to content

Commit

Permalink
update string clause
Browse files Browse the repository at this point in the history
  • Loading branch information
ozlerhakan committed Aug 7, 2018
1 parent 35a2175 commit e5c65ee
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/com/poiji/util/Casting.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,12 @@ public Object castValue(Class<?> fieldType, String value, PoijiOptions options)
o = enumValue(value, fieldType);

} else {
if (Boolean.TRUE.equals(options.preferNullOverDefault())) {
o = null;
if (value.length() == 0) {
if (Boolean.TRUE.equals(options.preferNullOverDefault())) {
o = null;
} else {
o = value;
}
} else {
o = value;
}
Expand Down

0 comments on commit e5c65ee

Please sign in to comment.