Skip to content

Commit e1ba3e7

Browse files
takeaction21sbrannen
authored andcommitted
Support float and double primitive default values in BeanUtils.instantiateClass()
See gh-27390
1 parent 2b55b9c commit e1ba3e7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spring-beans/src/main/java/org/springframework/beans/BeanUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ public abstract class BeanUtils {
8484
values.put(short.class, (short) 0);
8585
values.put(int.class, 0);
8686
values.put(long.class, (long) 0);
87+
values.put(float.class, (float) 0);
88+
values.put(double.class, (double) 0);
8789
DEFAULT_TYPE_VALUES = Collections.unmodifiableMap(values);
8890
}
8991

0 commit comments

Comments
 (0)