InvSee-plus-plus icon indicating copy to clipboard operation
InvSee-plus-plus copied to clipboard

Release as a Multi-Release JAR file with true ADTs

Open Jannyboy11 opened this issue 1 year ago • 1 comments

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 avatar Jan 04 '24 07:01 Jannyboy11

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).

Jannyboy11 avatar Jan 23 '24 06:01 Jannyboy11