Support float and double primitive default values in BeanUtils.instantiateClass()

See gh-27390
This commit is contained in:
takeaction21 2021-09-12 23:50:07 +08:00 committed by Sam Brannen
parent caf88ff2cc
commit 92cd680a2c
1 changed files with 2 additions and 0 deletions

View File

@ -88,6 +88,8 @@ public abstract class BeanUtils {
values.put(short.class, (short) 0);
values.put(int.class, 0);
values.put(long.class, (long) 0);
values.put(float.class, (float) 0);
values.put(double.class, (double) 0);
DEFAULT_TYPE_VALUES = Collections.unmodifiableMap(values);
}