PageSourceImpl: reloads source when source not changed and exists in class loader

Description

Debugging class loader issues where we get lots of duplicate classes (similar, but not the same as ).

What I found was that PageSourceImpl was reading from file and loading from the mapping’s class loader even though:

  • A class file already existed that was newer than the source

  • The class loader has an instance of the class in memory

This appears to happen when PageAndClassName pcn member of the PageSourceImpl is null / not initialised or has been reset. I believe that we should still try to load the class from the class loader using this.getClassName() and only read from source when that fails in this instance.

I think caused by this commit (but could not find any associated JIRA - looks like release in 5.3.6.15):

Environment

None

Activity

Dominic Watson 2 November 2023 at 19:23

Assignee

Reporter

Priority

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

Created 2 November 2023 at 19:08
Updated 7 November 2023 at 11:52