Skip to content

Commit

Permalink
fix: convert object to primitive type if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Silthus committed Dec 19, 2020
1 parent 7d3bdb2 commit 82cfa06
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private void setConfigField(Object config, ConfigFieldInformation fieldInformati
} else {
Field field = config.getClass().getDeclaredField(fieldInformation.name());
field.setAccessible(true);
field.set(config, fieldInformation.type().cast(value));
field.set(config, ReflectionUtil.toObject(fieldInformation.type(), value));
}
} catch (Exception e) {
e.printStackTrace();
Expand Down

0 comments on commit 82cfa06

Please sign in to comment.