Skip to content

Commit 8fb92b1

Browse files
committed
Add missing serialVersionUID
Signed-off-by: Lukas Jungmann <[email protected]>
1 parent 0c9ccd8 commit 8fb92b1

File tree

6 files changed

+27
-2
lines changed

6 files changed

+27
-2
lines changed

api/src/main/java/jakarta/json/EmptyArray.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
*/
3030
final class EmptyArray extends AbstractList<JsonValue> implements JsonArray, Serializable, RandomAccess {
3131

32+
/** for serialization */
3233
private static final long serialVersionUID = 7295439472061642859L;
3334

3435
@Override
@@ -106,7 +107,10 @@ public ValueType getValueType() {
106107
return ValueType.ARRAY;
107108
}
108109

109-
// Preserves singleton property
110+
/**
111+
* Preserves singleton property
112+
* @return {@link JsonValue#EMPTY_JSON_ARRAY}
113+
*/
110114
private Object readResolve() {
111115
return JsonValue.EMPTY_JSON_ARRAY;
112116
}

api/src/main/java/jakarta/json/EmptyObject.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*/
2929
final class EmptyObject extends AbstractMap<String, JsonValue> implements JsonObject, Serializable {
3030

31+
/** for serialization */
3132
private static final long serialVersionUID = -1461653546889072583L;
3233

3334
@Override
@@ -95,7 +96,10 @@ public ValueType getValueType() {
9596
return ValueType.OBJECT;
9697
}
9798

98-
// Preserves singleton property
99+
/**
100+
* Preserves singleton property
101+
* @return {@link JsonValue#EMPTY_JSON_OBJECT}
102+
*/
99103
private Object readResolve() {
100104
return JsonValue.EMPTY_JSON_OBJECT;
101105
}

api/src/main/java/jakarta/json/JsonException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
*/
2323
public class JsonException extends RuntimeException {
2424

25+
/** for serialization */
26+
private static final long serialVersionUID = 359810709545392112L;
27+
2528
/**
2629
* Constructs a new runtime exception with the specified detail message.
2730
* The cause is not initialized, and may subsequently be initialized by a

api/src/main/java/jakarta/json/JsonValueImpl.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,16 @@
2626
*/
2727
final class JsonValueImpl implements JsonValue, Serializable {
2828

29+
/** for serialization */
30+
private static final long serialVersionUID = 83723433120886104L;
31+
32+
/** Type of this JsonValue. */
2933
private final ValueType valueType;
3034

35+
/**
36+
* Default constructor.
37+
* @param valueType Type of this JsonValue
38+
*/
3139
JsonValueImpl(ValueType valueType) {
3240
this.valueType = valueType;
3341
}

api/src/main/java/jakarta/json/stream/JsonGenerationException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
*/
2525
public class JsonGenerationException extends JsonException {
2626

27+
/** for serialization */
28+
private static final long serialVersionUID = -207609100806940680L;
29+
2730
/**
2831
* Constructs a new runtime exception with the specified detail message.
2932
* The cause is not initialized, and may subsequently be initialized by a

api/src/main/java/jakarta/json/stream/JsonParsingException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
*/
2525
public class JsonParsingException extends JsonException {
2626

27+
/** for serialization */
28+
private static final long serialVersionUID = 9073566598484238797L;
29+
2730
/**
2831
* The location of the incorrect JSON.
2932
*/

0 commit comments

Comments
 (0)