Status/Resolution/Reason: To Fix//NeedMoreInfo
Reporter/Name(from Bugbase): Aaron Neff / ()
Created: 06/13/2018
Components: Language, Null Support
Versions: 2018
Failure Type: Incorrectly functioning
Found In Build/Fixed In Build: 2018.0.01.308605 (PreRelease) /
Priority/Frequency: Normal / Some users will encounter
Locale/System: / Platforms All
Vote Count: 0
Issue: NullPointer thrown for UndefinedVariable
Repro 1:
<cfscript>
function f(foo) {return foo+1}
f()
</cfscript>
Actual and Expected Result with NULL support disabled: coldfusion.runtime.UndefinedVariableException
Actual Result with NULL support enabled: java.lang.NullPointerException
Expected Result with NULL support enabled: coldfusion.runtime.UndefinedVariableException
Repro 2:
<cfscript>
function f(foo) {return foo}
writeDump(f())
</cfscript>
Actual and Expected Result with NULL support disabled: coldfusion.runtime.UndefinedVariableException
Actual Result with NULL support enabled: [null]
Expected Result with NULL support enabled: coldfusion.runtime.UndefinedVariableException
Note: `function f(foo)` is not the same as `function f(foo=null)`. The former is only a signature; it doesn't actually create a variable. The latter creates a variable with a null value. And f() certainly isn't the same as f(null).
So, the issue is that NullPointer is thrown for an UndefinedVariable.
Attachments:
Comments: