Release as a Multi-Release JAR file with true ADTs
Jannyboy11 opened this issue · 1 comments
Jannyboy11 commented
Since Java 21 it's possible to use pattern matching for records. For API users it would be nice if they could use this feature to destructure SpectateResponse and OpenResponse.
We can make publicly visible records (Open, Closed, Fail, Succeed) that implement the sealed interfaces OpenResponse and SpectateResponse in a Java-21 specific package. Implementations of NotOpenedReason and NotCreatedReason can also become records. These interfaces will not become sealed as to allow for more error reasons in the future.
Jannyboy11 commented
Now labeling this as 'good first issue' since InvSee++ is already released as a Multi-Release JAR file since version 0.26.0 (Java 8 support).