Use Java 17

This commit is contained in:
AsamK 2021-10-24 21:06:13 +02:00
parent 9cb1409918
commit ce70a623c2
51 changed files with 142 additions and 236 deletions

View file

@ -4,7 +4,7 @@ import com.fasterxml.jackson.databind.JsonNode;
import java.util.List;
public class JsonRpcBulkMessage extends JsonRpcMessage {
public final class JsonRpcBulkMessage extends JsonRpcMessage {
List<JsonNode> messages;

View file

@ -4,6 +4,6 @@ package org.asamk.signal.jsonrpc;
* Represents a JSON-RPC (bulk) request or (bulk) response.
* https://www.jsonrpc.org/specification
*/
public abstract class JsonRpcMessage {
public sealed abstract class JsonRpcMessage permits JsonRpcBulkMessage, JsonRpcRequest, JsonRpcResponse {
}

View file

@ -8,7 +8,7 @@ import com.fasterxml.jackson.databind.node.ValueNode;
* Represents a JSON-RPC request.
* https://www.jsonrpc.org/specification#request_object
*/
public class JsonRpcRequest extends JsonRpcMessage {
public final class JsonRpcRequest extends JsonRpcMessage {
/**
* A String specifying the version of the JSON-RPC protocol. MUST be exactly "2.0".

View file

@ -8,7 +8,7 @@ import com.fasterxml.jackson.databind.node.ValueNode;
* Represents a JSON-RPC response.
* https://www.jsonrpc.org/specification#response_object
*/
public class JsonRpcResponse extends JsonRpcMessage {
public final class JsonRpcResponse extends JsonRpcMessage {
/**
* A String specifying the version of the JSON-RPC protocol. MUST be exactly "2.0".