RFR: 8348611: Eliminate DeferredLintHandler and emit warnings after attribution [v10]

Archie Cobbs acobbs at openjdk.org
Wed Aug 13 18:13:16 UTC 2025


On Wed, 13 Aug 2025 16:56:10 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> would it makes sense to make this map a WeakHashMap? I'm thinking about cases where we are not using a ReusableContext and thus this map wont be cleared.

Frankly I'm a little fuzzy on that. If there were an issue with `LintMapper.fileInfoMap`, then wouldn't the same issue exist with `AbstractLog.sourceMap`? Note `LintMapper.clear()` and `Log.clear()` are called at the same time, so it seems in any given scenario, they are going to either both be cleared or both not be cleared.

> nit: should we keep this field in the final version? we can add it while debugging if needed

I can remove it. Besides, this symbol is always the same object as the one that the `Lint` instance was created with, so if debugging were a concern, a better place to store it would be with the `Lint` instance anyway.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24584#discussion_r2274249547
PR Review Comment: https://git.openjdk.org/jdk/pull/24584#discussion_r2274250193


More information about the compiler-dev mailing list