Skip to content

Commit 9d3af3c

Browse files
dfa1claude
andcommitted
refactor: annotate serialVersionUID with @serial
The three exception types declare `serialVersionUID`; mark each with `java.io.Serial` so the compiler validates the serialization contract and the intent is explicit (clears the IDE/Sonar "can be annotated with @serial" hint). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 8dc9e6c commit 9d3af3c

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

core/src/main/java/io/github/dfa1/vortex/core/error/VortexException.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import io.github.dfa1.vortex.core.model.EncodingId;
44

5+
import java.io.Serial;
56
import java.util.Optional;
67

78
/// Unrecoverable Vortex error: malformed file, unsupported feature, or encoding failure.
@@ -15,6 +16,7 @@
1516
/// for recovery logic.
1617
public final class VortexException extends RuntimeException {
1718

19+
@Serial
1820
private static final long serialVersionUID = 1L;
1921

2022
/// The encoding that raised this exception, or `null` if not attributed to a specific encoding.

fbs-gen/src/main/java/io/github/dfa1/vortex/fbsgen/FbsParseException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
package io.github.dfa1.vortex.fbsgen;
22

3+
import java.io.Serial;
4+
35
/// Thrown when a `.fbs` schema cannot be lexed or parsed.
46
public final class FbsParseException extends RuntimeException {
57

8+
@Serial
69
private static final long serialVersionUID = 1L;
710

811
/// @param message human-readable diagnostic, ideally with a 1-based line number

proto-gen/src/main/java/io/github/dfa1/vortex/protogen/ProtoParseException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
package io.github.dfa1.vortex.protogen;
22

3+
import java.io.Serial;
4+
35
/// Thrown when `.proto` source is malformed or uses unsupported syntax.
46
public final class ProtoParseException extends RuntimeException {
57

8+
@Serial
69
private static final long serialVersionUID = 1L;
710

811
/// @param message diagnostic

0 commit comments

Comments
 (0)