Class IdentityException

All Implemented Interfaces:
Serializable

public final class IdentityException extends RuntimeException
IdentityException is a preview API of the Java platform.
Programs can only use IdentityException when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Thrown when an identity object is required but a value object is supplied.

Identity objects are required for synchronization and locking. Value-based objects do not have identity and cannot be used for synchronization, locking, or any type of Reference.

Since:
28
See Also:
  • Constructor Details

    • IdentityException

      public IdentityException()
      Create an IdentityException with no message.
    • IdentityException

      public IdentityException(String message)
      Create an IdentityException with a message.
      Parameters:
      message - the detail message; can be null