mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8257845: Integrate JEP 390
8254047: [JEP 390] Revise "value-based class" & apply to wrappers 8252181: [JEP 390] Define & apply annotation jdk.internal.ValueBased 8252183: [JEP 390] Add 'lint' warning for @ValueBased classes 8257027: [JEP 390] Diagnose synchronization on @ValueBased classes 8252180: [JEP 390] Deprecate wrapper class constructors for removal Co-authored-by: Roger Riggs <rriggs@openjdk.org> Co-authored-by: Srikanth Adayapalam <sadayapalam@openjdk.org> Co-authored-by: Lois Foltan <lfoltan@openjdk.org> Reviewed-by: rriggs, hseigel, mchung, darcy
This commit is contained in:
parent
ed4c4ee73b
commit
48d8650ae1
113 changed files with 695 additions and 327 deletions
|
@ -131,10 +131,12 @@ import java.io.Serializable;
|
|||
* passed to a static factory method result in {@code IllegalArgumentException}.
|
||||
* <li>The iteration order of mappings is unspecified and is subject to change.
|
||||
* <li>They are <a href="../lang/doc-files/ValueBased.html">value-based</a>.
|
||||
* Callers should make no assumptions about the identity of the returned instances.
|
||||
* Factories are free to create new instances or reuse existing ones. Therefore,
|
||||
* identity-sensitive operations on these instances (reference equality ({@code ==}),
|
||||
* identity hash code, and synchronization) are unreliable and should be avoided.
|
||||
* Programmers should treat instances that are {@linkplain #equals(Object) equal}
|
||||
* as interchangeable and should not use them for synchronization, or
|
||||
* unpredictable behavior may occur. For example, in a future release,
|
||||
* synchronization may fail. Callers should make no assumptions
|
||||
* about the identity of the returned instances. Factories are free to
|
||||
* create new instances or reuse existing ones.
|
||||
* <li>They are serialized as specified on the
|
||||
* <a href="{@docRoot}/serialized-form.html#java.util.CollSer">Serialized Form</a>
|
||||
* page.
|
||||
|
@ -1636,10 +1638,12 @@ public interface Map<K, V> {
|
|||
* on a returned {@code Entry} result in {@code UnsupportedOperationException}.
|
||||
* <li>They are not serializable.
|
||||
* <li>They are <a href="../lang/doc-files/ValueBased.html">value-based</a>.
|
||||
* Callers should make no assumptions about the identity of the returned instances.
|
||||
* This method is free to create new instances or reuse existing ones. Therefore,
|
||||
* identity-sensitive operations on these instances (reference equality ({@code ==}),
|
||||
* identity hash code, and synchronization) are unreliable and should be avoided.
|
||||
* Programmers should treat instances that are {@linkplain #equals(Object) equal}
|
||||
* as interchangeable and should not use them for synchronization, or
|
||||
* unpredictable behavior may occur. For example, in a future release,
|
||||
* synchronization may fail. Callers should make no assumptions
|
||||
* about the identity of the returned instances. This method is free to
|
||||
* create new instances or reuse existing ones.
|
||||
* </ul>
|
||||
*
|
||||
* @apiNote
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue