Title:
Weirdly specific/odd nested structure issue post CF2016 update 12 + java update
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Chris H. / ()
Created: 09/25/2019
Components: General Server
Versions: 2016,2018
Failure Type:
Found In Build/Fixed In Build: 2016.0.12.315717 / CF2016U13,CF2018U6
Priority/Frequency: Major /
Locale/System: / Windows 10 64 bit
Vote Count: 5
Problem Description:
Nested implicit structures in an argument in an IF statement are throwing an error post CF 2016 update 12 & Java update.
Was on 2016 Update 11 with Java 1.8.0_191
This breaks on update to CF2016 Java 1.8.0_211 or 191
Steps to Reproduce:
{code:java}
<cffunction name="getHello">
<cfargument name="anArgument">
<cfreturn "hello" >
</cffunction>
<!--- disclaimer - yes this is quite wonky code... lets not talk about that... --->
<!--- DOES NOT WORK, But did before Updating to CF2016 Update 11 -> CF2016 Update 12 & Java 1.8.0_191 -> Java 1.8.0_211 --->
<cfoutput>
<cfset somethingElse = 1>
<cfif 1 EQ 1>
#getHello(
anArgument = {
key =
{ anotherKey = somethingElse }
}
)#
<cfelse>
something else
</cfif>
</cfoutput>{code}
{code:java}
<!--- A fix, remove the variable and directly assign --->
<cfoutput>
<cfset somethingElse = 1>
<cfif 1 EQ 1>
#getHello(
anArgument = {
key = { anotherKey = 1 }
}
)#
<cfelse>
something else
</cfif>
</cfoutput>
{code}
{code:java}
<!--- A fix, remove the else case --->
<cfoutput>
<cfset somethingElse = 1>
<cfif 1 EQ 1>
#getHello(
anArgument = {
key = { anotherKey = somethingElse }
}
)#
</cfif>
</cfoutput>{code}
Actual Result:
error
Expected Result:
hello hello hello
Any Workarounds:
remove the IF statement or assign the variable directly instead of referencing it
Attachments:
Comments: