Title:
Use of implicit array syntax in conditional operator throws invalid CFML construct
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/CannotReproduce
Reporter/Name(from Bugbase): Jonathan Clausen / Jonathan Clausen (Jonathan Clausen)
Created: 08/01/2016
Components: Language, Functions
Versions: 2016
Failure Type:
Found In Build/Fixed In Build: CF2016_Update1 /
Priority/Frequency: Major / All users will encounter
Locale/System: ALL / Mac 10 All
Vote Count: 0
Problem Description:
The use of an implicit array within a an implicit conditional statement throws intermitted errors.
Steps to Reproduce:
myVar = someArray.isEmpty() ? [] : someArray;
Actual Result:
Invalid CFML construct found
Relevant stack trace:
at coldfusion.compiler.cfml40.generateParseException(cfml40.java:14410)
at coldfusion.compiler.cfml40.jj_consume_token(cfml40.java:14281)
at coldfusion.compiler.cfml40.OrderedStructInitializer(cfml40.java:898)
at coldfusion.compiler.cfml40.ArrayOrStructInitializer(cfml40.java:732)
at coldfusion.compiler.cfml40.Initializer(cfml40.java:692)
at coldfusion.compiler.cfml40.HookExpression(cfml40.java:5700)
at coldfusion.compiler.cfml40.expr(cfml40.java:5661)
at coldfusion.compiler.cfml40.cfScriptExpression(cfml40.java:2856)
at coldfusion.compiler.cfml40.SimpleStatement(cfml40.java:619)
at coldfusion.compiler.cfml40.cfscriptStatement(cfml40.java:1651)
at coldfusion.compiler.cfml40.cfscriptBlock(cfml40.java:2821)
at coldfusion.compiler.cfml40.cfscriptStatement(cfml40.java:1708)
at coldfusion.compiler.cfml40.ComplexStatement(cfml40.java:1806)
at coldfusion.compiler.cfml40.cfscriptStatement(cfml40.java:1695)
at coldfusion.compiler.cfml40.functionDefinition(cfml40.java:3467)
at coldfusion.compiler.cfml40.cfscriptStatement(cfml40.java:1713)
at coldfusion.compiler.cfml40.start(cfml40.java:5112)
at coldfusion.compiler.NeoTranslator.parsePage(NeoTranslator.java:690)
at coldfusion.compiler.NeoTranslator.parsePage(NeoTranslator.java:635)
at coldfusion.compiler.NeoTranslator.parseAndTransform(NeoTranslator.java:457)
at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:407)
at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:160)
at coldfusion.runtime.TemplateClassLoader$TemplateCache$1.fetch(TemplateClassLoader.java:480)
at coldfusion.util.LruCache.get(LruCache.java:180)
at coldfusion.runtime.TemplateClassLoader$TemplateCache.fetchSerial(TemplateClassLoader.java:400)
at coldfusion.util.AbstractCache.fetch(AbstractCache.java:58)
at coldfusion.util.SoftCache.get_statsOff(SoftCache.java:133)
at coldfusion.util.SoftCache.get(SoftCache.java:81)
at coldfusion.runtime.TemplateClassLoader.findClass(TemplateClassLoader.java:668)
at coldfusion.runtime.MetadataUtils.getComponentMetadata(MetadataUtils.java:140)
at coldfusion.runtime.MetadataUtils.getComponentMetadata(MetadataUtils.java:126)
at coldfusion.runtime.MetadataUtils.getComponentMetadata(MetadataUtils.java:113)
at coldfusion.runtime.CfJspPage.GetComponentMetadata(CfJspPage.java:3643)
Expected Result:
Success
Any Workarounds:
Using arrayNew(1) does not throw an error.
myVar = someArray.isEmpty() ? arrayNew(1) : someArray;
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4177585
Reason: PRHaveInfo
External Customer Info:
External Company:
External Customer Name: Jonathan Clausen
External Customer Email:
External Test Config: My Hardware and Environment details:
Server Details
Server Product ColdFusion 2016
Version 2016.0.02.299200
Edition Enterprise
Operating System Mac OS X
OS Version 10.11.5
Update Level /WEB-INF/cfusion/lib/updates/chf20160002.jar
Adobe Driver Version 5.1.4 (Build 0001)
JVM Details
Java Version 1.8.0_102
Java Vendor Oracle Corporation
Java Vendor URL http://java.oracle.com/
Java Home /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre
Java File Encoding UTF8
Java Default Locale en_US
File Separator /
Path Separator :
Line Separator Chr(10)
User Name root
Java VM Specification Version 1.8
Java VM Specification Vendor Oracle Corporation
Java VM Specification Name Java Virtual Machine Specification
Java VM Version 25.102-b14
Java VM Vendor Oracle Corporation
Java VM Name Java HotSpot(TM) 64-Bit Server VM
Java Specification Version 1.8
Java Specification Vendor Oracle Corporation
Java Specification Name Java Platform API Specification
Java Class Version 52.0
Attachments:
Comments: