Closed lianyiwuming closed 1 year ago
Shouldn't you use java.lang.String
like this
"@org.apache.commons.lang3.StringUtils@equalsAny('dd',new java.lang.String[]{'dd'})"
?
Shouldn't you use
java.lang.String
like this"@org.apache.commons.lang3.StringUtils@equalsAny('dd',new java.lang.String[]{'dd'})"
?
I tried and got the same error. It's seem because of the varargs method. After I delete the if (method.isVarArgs()){}
block in method ognl.OgnlRuntime#callAppropriateMethod
, I got the right result.
@lianyiwuming ,
Are you aware that you don't need to create the array explicitly?
"@org.apache.commons.lang3.StringUtils@equalsAny('cc', 'dd', 'ee')"
@harawata oooh,yes, you are right, thx
Does this fix the problem?
Yes! It work when I use varargs instead of the array explicitly. @lukaszlenart
java 1.8 ognl 3.3.0 | 3.3.4
when i execute this method, i got an exception:
the method is below: