Closed jasmith-hs closed 2 years ago
In ELUtil.java, when building the parameters for invoking a method, if the final argument of a method is VarArgs and the value is null, then a NullPointerException will be thrown here: https://github.com/jakartaee/expression-language/blob/18bec35a2e5aa73c3aea252880f70472f6de5615/api/src/main/java/jakarta/el/ELUtil.java#L681 Due to params[varArgIndex] being null and null.getClass() cannot be done. A null value for VarArgs in java so something like this seems appropriate:
null
params[varArgIndex]
null.getClass()
if (parameterTypes.length == paramCount && (params[varArgIndex] == null || parameterTypes[varArgIndex] == params[varArgIndex].getClass())) {
Since EL doesn't support casting, a null in that instance is a single argument for the varags which needs to be coerced so the short-cut can't be used. I have a fix for this that I'll commit shortly.
In ELUtil.java, when building the parameters for invoking a method, if the final argument of a method is VarArgs and the value is
null
, then a NullPointerException will be thrown here: https://github.com/jakartaee/expression-language/blob/18bec35a2e5aa73c3aea252880f70472f6de5615/api/src/main/java/jakarta/el/ELUtil.java#L681 Due toparams[varArgIndex]
beingnull
andnull.getClass()
cannot be done. A null value for VarArgs in java so something like this seems appropriate: