On Fri, 18 Apr 2025 02:32:06 GMT, Chen Liang <li...@openjdk.org> wrote:
>> This PR is defining a new internal annotation, >> `@jdk.internal.RequiresIdentity`, with target types PARAMETER and >> TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation >> that an argument to a given method or constructor parameter will be an >> object with a unique identity, not an instance of a value-based class; or >> that the type argument to a given type parameter will not be a value-based >> class type. >> >> For more details please refer to the complete description in the >> corresponding JIRA entry [1] >> >> TIA >> >> [1] https://bugs.openjdk.org/browse/JDK-8354556 > > src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties > line 4253: > >> 4251: >> 4252: # lint: identity >> 4253: >> compiler.warn.attempt.to.synchronize.on.instance.of.value.based.class2=\ > > How is this different from the message with no 2 suffix? Is there a reason > why one localization entry is required for one type of lint? the requirement is for the identity lint warning to be an alias of the synchronization warning ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24746#discussion_r2053222093