From 6bd8e288efd519a11fe7fc6c10335073ab6091fd Mon Sep 17 00:00:00 2001 From: Kushal Pisavadia Date: Mon, 16 Dec 2024 22:36:41 +0000 Subject: [PATCH] Convert `org.pkl.executor.Version.Identifier` POJO to `record` class (#836) --- .../src/main/java/org/pkl/executor/Version.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pkl-executor/src/main/java/org/pkl/executor/Version.java b/pkl-executor/src/main/java/org/pkl/executor/Version.java index 73aecc39..2f2d8a28 100644 --- a/pkl-executor/src/main/java/org/pkl/executor/Version.java +++ b/pkl-executor/src/main/java/org/pkl/executor/Version.java @@ -237,14 +237,8 @@ final class Version implements Comparable { return __preReleaseIdentifiers; } - private static final class Identifier implements Comparable { - private final long numericId; - private final /*@Nullable*/ String alphanumericId; - - Identifier(long numericId, /*@Nullable*/ String alphanumericId) { - this.numericId = numericId; - this.alphanumericId = alphanumericId; - } + private record Identifier(long numericId, /*@Nullable*/ String alphanumericId) + implements Comparable { @Override public int compareTo(/*@Nonnull*/ @SuppressWarnings("NullableProblems") Identifier other) {