Details
Assignee
Michael OffnerMichael OffnerReporter
Bakianyor BakiaBakianyor BakiaPriority
CriticalNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Bakianyor Bakia
Bakianyor BakiaPriority
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 25 March 2021 at 15:41
Updated 17 April 2023 at 06:18
The for-in loop throws a NullPointerException when it is located within the finally-block. You can reproduce this with either of the following:
<cfscript> doIt({key1:"foo", key2:"bar", key3:"baz"}); public void function doIt(struct data) { try { writeOutput("trying<br>"); } finally { writeOutput("finally<br>"); for (var key in data) { writeOutput(key & "<br>"); } } } </cfscript> <cfscript> doIt(["a", "b"]); public void function doIt(array data) { try { writeOutput("trying<br>"); } finally { writeOutput("finally<br>"); for (var loopItem in data) { writeOutput(loopItem & "<br>"); } } } </cfscript>