Module java.base
Package java.lang

# Class IdentityException

+Only in: valhalla-csr-open; not in: jdk-master.
public class IdentityException
extends java.lang.RuntimeException
Not in jdk-master; only in valhalla-csr-open

All Implemented Interfaces:
  `Serializable`

public 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:
  Valhalla
See Also:
  - Serialized Form

## Constructors

- +
  public IdentityException()
  Not in jdk-master; only in valhalla-csr-open

  ### IdentityException

  public IdentityException()
  Create an `IdentityException` with no message.
- +
  public IdentityException(java.lang.Class<?> arg0)
  Not in jdk-master; only in valhalla-csr-open

  ### IdentityException

  public IdentityException(Class<?> clazz)
  Create an `IdentityException` with the class name and default message.
  Parameters:
    `clazz` - the class of the object
- +
  public IdentityException(java.lang.String arg0)
  Not in jdk-master; only in valhalla-csr-open

  ### IdentityException

  public IdentityException(String message)
  Create an `IdentityException` with a message.
  Parameters:
    `message` - the detail message; can be `null`
- +
  public IdentityException(java.lang.String arg0, java.lang.Throwable arg1)
  Not in jdk-master; only in valhalla-csr-open

  ### IdentityException

  public IdentityException(String message, Throwable cause)
  Create an `IdentityException` with a message and cause.
  Parameters:
    `message` - the detail message; can be `null`
    `cause` - the cause; `null` is permitted, and indicates that the cause is nonexistent or unknown.
- +
  public IdentityException(java.lang.Throwable arg0)
  Not in jdk-master; only in valhalla-csr-open

  ### IdentityException

  public IdentityException(Throwable cause)
  Create an `IdentityException` with a cause.
  Parameters:
    `cause` - the cause; `null` is permitted, and indicates that the cause is nonexistent or unknown.

## Summary

Differences
| Elements | Comments | Descriptions | Total
Added | Changed | Removed | Added | Changed | Removed | Added | Changed | Removed
--- | --- | --- | --- | --- | --- | --- | --- | ---
IdentityException | 1 |  |  |  |  |  | 1 |  |  | 2
<init>() |  |  |  |  |  |  | 1 |  |  | 1
<init>(Class) |  |  |  |  |  |  | 1 |  |  | 1
<init>(String) |  |  |  |  |  |  | 1 |  |  | 1
<init>(String,Throwable) |  |  |  |  |  |  | 1 |  |  | 1
<init>(Throwable) |  |  |  |  |  |  | 1 |  |  | 1
Total | 1 |  |  |  |  |  | 6 |  |  | 7