aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kubatech/api/utils/GSONUtils.java
diff options
context:
space:
mode:
authorkuba6000 <kuba.123123.6000@gmail.com>2023-04-10 21:03:52 +0200
committerkuba6000 <kuba.123123.6000@gmail.com>2023-04-10 21:03:52 +0200
commit74a9bcc5a0b7e179a71932e7dba88794deeb4c99 (patch)
treea80901824606cae422be00d026605da912054c06 /src/main/java/kubatech/api/utils/GSONUtils.java
parent0ecb697d75b25206daf921ecec1c910d6ab77491 (diff)
downloadGT5-Unofficial-74a9bcc5a0b7e179a71932e7dba88794deeb4c99.tar.gz
GT5-Unofficial-74a9bcc5a0b7e179a71932e7dba88794deeb4c99.tar.bz2
GT5-Unofficial-74a9bcc5a0b7e179a71932e7dba88794deeb4c99.zip
Update spotless formatting
Diffstat (limited to 'src/main/java/kubatech/api/utils/GSONUtils.java')
-rw-r--r--src/main/java/kubatech/api/utils/GSONUtils.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/main/java/kubatech/api/utils/GSONUtils.java b/src/main/java/kubatech/api/utils/GSONUtils.java
index 99580ad803..636dc7d6ce 100644
--- a/src/main/java/kubatech/api/utils/GSONUtils.java
+++ b/src/main/java/kubatech/api/utils/GSONUtils.java
@@ -57,7 +57,8 @@ public class GSONUtils {
try {
if (!(json instanceof JsonArray)) return null;
byte[] bytes = new byte[((JsonArray) json).size()];
- for (int i = 0; i < bytes.length; i++) bytes[i] = ((JsonArray) json).get(i).getAsByte();
+ for (int i = 0; i < bytes.length; i++) bytes[i] = ((JsonArray) json).get(i)
+ .getAsByte();
return CompressedStreamTools.func_152457_a(bytes, new NBTSizeTracker(2097152L));
} catch (IOException e) {
throw new RuntimeException(e);
@@ -65,11 +66,15 @@ public class GSONUtils {
};
public static final GsonBuilder GSON_BUILDER = new GsonBuilder().addSerializationExclusionStrategy(GSONStrategy)
- .addDeserializationExclusionStrategy(GSONStrategy)
- .registerTypeAdapter(NBTTagCompound.class, NBTTagCompoundDeserializer)
- .registerTypeAdapter(NBTTagCompound.class, NBTTagCompoundSerializer).serializeNulls();
+ .addDeserializationExclusionStrategy(GSONStrategy)
+ .registerTypeAdapter(NBTTagCompound.class, NBTTagCompoundDeserializer)
+ .registerTypeAdapter(NBTTagCompound.class, NBTTagCompoundSerializer)
+ .serializeNulls();
public static final GsonBuilder GSON_BUILDER_PRETTY = new GsonBuilder()
- .addSerializationExclusionStrategy(GSONStrategy).addDeserializationExclusionStrategy(GSONStrategy)
- .registerTypeAdapter(NBTTagCompound.class, NBTTagCompoundDeserializer)
- .registerTypeAdapter(NBTTagCompound.class, NBTTagCompoundSerializer).serializeNulls().setPrettyPrinting();
+ .addSerializationExclusionStrategy(GSONStrategy)
+ .addDeserializationExclusionStrategy(GSONStrategy)
+ .registerTypeAdapter(NBTTagCompound.class, NBTTagCompoundDeserializer)
+ .registerTypeAdapter(NBTTagCompound.class, NBTTagCompoundSerializer)
+ .serializeNulls()
+ .setPrettyPrinting();
}