Do not allow Strings parameters of length 1 to be casted into a number.
This commit is contained in:
parent
a2c4745d8e
commit
d93efaa377
1 changed files with 1 additions and 5 deletions
|
@ -432,11 +432,7 @@ public abstract class ESLoader extends ESObject {
|
|||
debugInfo = " rejected (not widening numbers)";
|
||||
}
|
||||
// Handle String of length 1 as a Char, which can be converted to a number
|
||||
} else if ((targetClass == Character.class ||
|
||||
targetClass == Integer.class ||
|
||||
targetClass == Long.class ||
|
||||
targetClass == Float.class ||
|
||||
targetClass == Double.class)
|
||||
} else if (targetClass == Character.class
|
||||
&& params[i] instanceof String) {
|
||||
if (((String) params[i]).length()==1) {
|
||||
accepted = true; // will require conversion of parameter
|
||||
|
|
Loading…
Add table
Reference in a new issue