8202922: Method reference identity is broken by serialization
Reviewed-by: jlaskey, mchung
This commit is contained in:
parent
c0191347e0
commit
54e53458c6
@ -61,7 +61,13 @@ import java.util.Arrays;
|
||||
* parameters</em>, which must be provided as arguments to the
|
||||
* {@code CallSite} target, and which may be early-bound to the behavior
|
||||
* {@code MethodHandle}. The number of captured parameters and their types
|
||||
* are determined during linkage.</li>
|
||||
* are determined during linkage.
|
||||
* The identity of a function object produced by invoking the
|
||||
* {@code CallSite}'s target is unpredictable, and therefore
|
||||
* identity-sensitive operations (such as reference equality, object
|
||||
* locking, and {@code System.identityHashCode()} may produce different
|
||||
* results in different implementations, or even upon different invocations
|
||||
* in the same implementation.</li>
|
||||
*
|
||||
* <li><em>Invocation</em> occurs when an implemented interface method
|
||||
* is invoked on a function object. This may occur many times for a single
|
||||
|
@ -53,6 +53,12 @@ import java.util.Objects;
|
||||
* that the properties of the {@code SerializedLambda} are consistent with a
|
||||
* lambda actually captured by that class.
|
||||
*
|
||||
* <p>The identity of a function object produced by deserializing the serialized
|
||||
* form is unpredictable, and therefore identity-sensitive operations (such as
|
||||
* reference equality, object locking, and {@code System.identityHashCode()} may
|
||||
* produce different results in different implementations, or even upon
|
||||
* different deserializations in the same implementation.
|
||||
*
|
||||
* @see LambdaMetafactory
|
||||
* @since 1.8
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user