Static constructor is executed twice in components

Description


1. What did I do?
Re-saved Person.cfc and executed template test.cfm.

2. What did I expect?
The constructor to execute and set the random number once. I then expected to see the same number in static.constructed three times in the output from test.cfm.

3. What happened instead?
The constructor executed twice, so the first static.constructed was different from the last two in the output from test.cfm.


Edit 1: The constructor is executed only once when I run test.cfm the first time after a Tomcat restart.


Person.cfc

test.cfm

Output:

Environment

OS X, Tomcat

Activity

Pothys - MitrahSoft 18 July 2018 at 11:15

No more further info to reproduce the issue, So I close this ticket.

Pothys - MitrahSoft 15 February 2018 at 07:31

Hi ,

I couldn't able to reproduce the issue So can I close this ticket?

Pothys - MitrahSoft 29 December 2017 at 06:33

Hi & ,
I've checked this with Mac, JAVA 1.8.151 & Lucee 5.1.0.34-express. I couldn't able to see any issues. So we could close this ticket.

Michael Offner 17 October 2016 at 14:55

i was not able to reproduce with the latest version of 5.0
https://travis-ci.org/lucee/Lucee/builds/168314939
with the following new testcase based on your input.
https://github.com/lucee/Lucee/commit/43948e6aeb0095b5ce41fc5bb50856085a7fdaa9

there should be no difference between 5.0 and 5.1 when it comes to this, but we will merge the testcase to 5.1 as well and communicate the result here.

you can also test again with the latest lucee 5.1 version, to version you have tested is outdated.

Cannot Reproduce

Details

Assignee

Reporter

Priority

Labels

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 14 October 2016 at 06:41
Updated 5 May 2023 at 09:41
Resolved 18 July 2018 at 11:15