Skip to content

Commit

Permalink
Add missing serialVersionUID
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Oct 1, 2021
1 parent 0c9ccd8 commit 8fb92b1
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 2 deletions.
6 changes: 5 additions & 1 deletion api/src/main/java/jakarta/json/EmptyArray.java
Expand Up @@ -29,6 +29,7 @@
*/
final class EmptyArray extends AbstractList<JsonValue> implements JsonArray, Serializable, RandomAccess {

/** for serialization */
private static final long serialVersionUID = 7295439472061642859L;

@Override
Expand Down Expand Up @@ -106,7 +107,10 @@ public ValueType getValueType() {
return ValueType.ARRAY;
}

// Preserves singleton property
/**
* Preserves singleton property
* @return {@link JsonValue#EMPTY_JSON_ARRAY}
*/
private Object readResolve() {
return JsonValue.EMPTY_JSON_ARRAY;
}
Expand Down
6 changes: 5 additions & 1 deletion api/src/main/java/jakarta/json/EmptyObject.java
Expand Up @@ -28,6 +28,7 @@
*/
final class EmptyObject extends AbstractMap<String, JsonValue> implements JsonObject, Serializable {

/** for serialization */
private static final long serialVersionUID = -1461653546889072583L;

@Override
Expand Down Expand Up @@ -95,7 +96,10 @@ public ValueType getValueType() {
return ValueType.OBJECT;
}

// Preserves singleton property
/**
* Preserves singleton property
* @return {@link JsonValue#EMPTY_JSON_OBJECT}
*/
private Object readResolve() {
return JsonValue.EMPTY_JSON_OBJECT;
}
Expand Down
3 changes: 3 additions & 0 deletions api/src/main/java/jakarta/json/JsonException.java
Expand Up @@ -22,6 +22,9 @@
*/
public class JsonException extends RuntimeException {

/** for serialization */
private static final long serialVersionUID = 359810709545392112L;

/**
* Constructs a new runtime exception with the specified detail message.
* The cause is not initialized, and may subsequently be initialized by a
Expand Down
8 changes: 8 additions & 0 deletions api/src/main/java/jakarta/json/JsonValueImpl.java
Expand Up @@ -26,8 +26,16 @@
*/
final class JsonValueImpl implements JsonValue, Serializable {

/** for serialization */
private static final long serialVersionUID = 83723433120886104L;

/** Type of this JsonValue. */
private final ValueType valueType;

/**
* Default constructor.
* @param valueType Type of this JsonValue
*/
JsonValueImpl(ValueType valueType) {
this.valueType = valueType;
}
Expand Down
Expand Up @@ -24,6 +24,9 @@
*/
public class JsonGenerationException extends JsonException {

/** for serialization */
private static final long serialVersionUID = -207609100806940680L;

/**
* Constructs a new runtime exception with the specified detail message.
* The cause is not initialized, and may subsequently be initialized by a
Expand Down
Expand Up @@ -24,6 +24,9 @@
*/
public class JsonParsingException extends JsonException {

/** for serialization */
private static final long serialVersionUID = 9073566598484238797L;

/**
* The location of the incorrect JSON.
*/
Expand Down

0 comments on commit 8fb92b1

Please sign in to comment.