On Fri, 25 Oct 2024 21:25:54 GMT, Jiangli Zhou <jian...@openjdk.org> wrote:
> Moved from > https://github.com/openjdk/jdk/pull/21672/commits/ade90fb51d1e3652910a3b46775522b730306e16: > > Please review the fix that uses String type for the mapped value in > ModuleLoaderMap.Mapper map (Map<String, String>). Please see details in > https://bugs.openjdk.org/browse/JDK-8342642, thanks. > > Existing comment threads from closed > https://github.com/openjdk/jdk/pull/21672/commits/ade90fb51d1e3652910a3b46775522b730306e16: > - https://github.com/openjdk/jdk/pull/21672#issuecomment-2436358591 > - https://github.com/openjdk/jdk/pull/21672#issuecomment-2437465648 > - https://github.com/openjdk/jdk/pull/21672#issuecomment-2438567642 > - https://github.com/openjdk/jdk/pull/21672#issuecomment-2436262114 > - https://github.com/openjdk/jdk/pull/21672#issuecomment-2437501231 Re @shipilev's `.equals` vs `==`: The core libraries in particular depends on the identity of interned strings, notably in reflection method/field names. This has become a contract. The constant expression strings being interned is stronger than this contract as it's part of JLS, and I see no problem for other code to rely on the string being interned. In fact, it would be better if we can fail-fast if the string interning fails in Leyden. ------------- PR Comment: https://git.openjdk.org/jdk/pull/21722#issuecomment-2439599621