XenoAmess commented on a change in pull request #25:
URL: https://github.com/apache/commons-beanutils/pull/25#discussion_r432844827
##########
File path:
src/main/java/org/apache/commons/beanutils2/locale/converters/DoubleLocaleConverter.java
##########
@@ -212,7 +212,7 @@ public DoubleLocaleConverter(final Object defaultValue,
final Locale locale, fin
protected Object parse(final Object value, final String pattern) throws
ParseException {
final Number result = (Number) super.parse(value, pattern);
if (result instanceof Long) {
- return Double.valueOf(result.doubleValue());
+ return result.doubleValue();
Review comment:
done.
##########
File path:
src/main/java/org/apache/commons/beanutils2/locale/converters/FloatLocaleConverter.java
##########
@@ -219,6 +219,6 @@ protected Object parse(final Object value, final String
pattern) throws ParseExc
if (posDouble != 0 && (posDouble < Float.MIN_VALUE || posDouble >
Float.MAX_VALUE)) {
throw new ConversionException("Supplied number is not of type Float:
"+parsed);
}
- return Float.valueOf(parsed.floatValue()); // unlike superclass it
returns Float type
+ return parsed.floatValue(); // unlike superclass it returns Float type
Review comment:
done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]