Skip to content

Commit

Permalink
Downgrade to Java 1.8 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luna committed Jun 1, 2023
1 parent 72b8aa4 commit 02527cc
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ dependencies {
java {
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

jar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@
import java.util.LinkedList;
import java.util.List;

public record BCServerList(List<BCServerInfo> servers) {
public class BCServerList {
private final List<BCServerInfo> servers;

public BCServerList(final List<BCServerInfo> servers) {
this.servers = servers;
}

public static BCServerList fromDocument(final Document document) {
final List<BCServerInfo> servers = new LinkedList<>();
Expand Down Expand Up @@ -116,7 +121,6 @@ public static BCServerList fromDocument(final Document document) {
return new BCServerList(servers);
}

@Override
public List<BCServerInfo> servers() {
return Collections.unmodifiableList(this.servers);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@

import java.util.List;

public record CCServerList(List<CCServerInfo> servers) {
public class CCServerList {
private final List<CCServerInfo> servers;

public CCServerList(final List<CCServerInfo> servers) {
this.servers = servers;
}

public List<CCServerInfo> servers() {
return this.servers;
}

public static CCServerList fromJson(final String json) {
return ClassiCubeHandler.GSON.fromJson(json, CCServerList.class);
Expand Down
17 changes: 16 additions & 1 deletion src/main/java/de/florianmichael/classic4j/util/Pair.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,20 @@
*/
package de.florianmichael.classic4j.util;

public record Pair<K, V>(K key, V value) {
public class Pair<K, V> {
private final K key;
private final V value;

public Pair(final K key, final V value) {
this.key = key;
this.value = value;
}

public K key() {
return this.key;
}

public V value() {
return this.value;
}
}

0 comments on commit 02527cc

Please sign in to comment.