Title:
[ANeff] Bug for: some cross-applied member functions throw incorrect parameter check exception
| View in TrackerStatus/Resolution/Reason: Needs Review//HasDependency
Reporter/Name(from Bugbase): Aaron Neff / ()
Created: 06/20/2018
Components: Language, Member Functions
Versions: 2018
Failure Type: Others
Found In Build/Fixed In Build: 2018.0.0.310409 /
Priority/Frequency: Normal / Very few users will encounter
Locale/System: / Platforms All
Vote Count: 0
Issue: some cross-applied member functions throw incorrect parameter check exception
Repro:
{code:java}
<cfscript>
//string member on string
myVar = "asdf"
myVar.left()//coldfusion.runtime.java.AbstractMethodHandleMapper$WrongParameterNumberException (good)
//string member on boolean
myVar = true
myVar.left()//coldfusion.runtime.java.AbstractMethodHandleMapper$WrongParameterNumberException (good)
//string member on numeric
myVar = 1
myVar.left()//coldfusion.runtime.java.MethodSelectionException (bad)
//numeric member on string
myVar = "1"
myVar.min()//coldfusion.runtime.java.MethodSelectionException (bad)
//date member on string
myVar = "2018-01-01T00:00:00Z"
myVar.add()//coldfusion.runtime.java.MethodSelectionException (bad)
</cfscript>
{code}
Actual Result: some throw coldfusion.runtime.java.MethodSelectionException
Expected Result: all throw coldfusion.runtime.java.AbstractMethodHandleMapper$WrongParameterNumberException
Note: Please don't only fix this for numeric.left(), string.min() and string.add(). =P The fix should be generic and apply to all 'string member on numeric', 'numeric member on string' and 'date member on string' cases.
Attachments:
Comments: