CSR :
|
|
Cloners :
|
|
Relates :
|
|
Relates :
|
JDK-8269255 :
|
Introduce a method in the Objects utility class, something like: /** * Construct a new instance of an unspecified class. The object has * a unique identity—no other references to it exist. It can be * used for synchronization, or where a placeholder Object is * needed. Use this method to avoid relying on the Object constructor. */ public static Object newIdentity() { return new Object() {}; } (The method appears somewhat unmotivated for now, but with JEP 401, use of the Object constructor will be discouraged (with warnings) in Java source, and this method provides a migration path to something else.)
|