Fixes some incompatibility between final and stupid reflection

This commit is contained in:
2023-06-24 03:48:33 +02:00
parent 75140cf97b
commit 8900d01f56
114 changed files with 246 additions and 235 deletions

View File

@@ -15,7 +15,7 @@ public class BoardAdapter implements JsonDeserializer<Board>, JsonSerializer<Boa
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static final BoardAdapter i = new BoardAdapter();
protected static BoardAdapter i = new BoardAdapter();
public static BoardAdapter get() {
return i;

View File

@@ -20,7 +20,7 @@ public class BoardMapAdapter implements JsonDeserializer<Map<PS, TerritoryAccess
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static final BoardMapAdapter i = new BoardMapAdapter();
protected static BoardMapAdapter i = new BoardMapAdapter();
public static BoardMapAdapter get() {
return i;

View File

@@ -34,7 +34,7 @@ public class TerritoryAccessAdapter implements JsonDeserializer<TerritoryAccess>
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static final TerritoryAccessAdapter i = new TerritoryAccessAdapter();
protected static TerritoryAccessAdapter i = new TerritoryAccessAdapter();
public static TerritoryAccessAdapter get() {
return i;
@@ -56,13 +56,13 @@ public class TerritoryAccessAdapter implements JsonDeserializer<TerritoryAccess>
JsonObject obj = json.getAsJsonObject();
// Prepare variables
String hostFactionId = null;
String hostFactionId;
Boolean hostFactionAllowed = null;
Set<String> grantedIds = Collections.emptySet();
String chunkName = null;
// Read variables (test old values first)
JsonElement element = null;
JsonElement element;
element = obj.get(HOST_FACTION_ID);
hostFactionId = element.getAsString();