Community
Participate
Working Groups
This defect only happens when the && is used such as if (options != null && options.getSize() > 0) Testcase --------- package client; // RUI Handler // // handler testArrayNull type RUIhandler{onConstructionFunction = start, cssFile = "css/testBugs.css", title = "testArrayNull"} options String[] = ["coffee", "tea", "sugar"]; function start() if (options != null && options.getSize() > 0) // if (options != null) printOptions(options); end end function printOptions(opts String[] in) for (index int from 1 to opts.getSize() by 1) syslib.writeStdout(opts[index]); end end end ----- The generated js for if (options != null && options.getSize() > 0) is like eze$Temp1 = ((egl.eglx.lang.EBoolean.ezeCast({eze$$value : this.options.appendElement(null), eze$$signature : "Teglx/lang/EList;"}) && ((this.options.getSize() > 0)))); In which append null to this.options is wrong --------------- The RadioGroup widget suffers from this defect, can have a workaround to bypass it. But such kind of boolean statement is used frequently, so set the severity to major.
Jeff, I was able to create this same problem in Java gen; I think reorgcode is the culprit. visit(BinaryExpression ...) has logic that injects appendAll / appendElement, so perhaps that logic is too simplistic as illustrated by this testcase.
fixed
Verified in 201110202102