From 74a9bcc5a0b7e179a71932e7dba88794deeb4c99 Mon Sep 17 00:00:00 2001 From: kuba6000 Date: Mon, 10 Apr 2023 21:03:52 +0200 Subject: Update spotless formatting --- src/main/java/kubatech/api/utils/GSONUtils.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/main/java/kubatech/api/utils/GSONUtils.java') 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(); } -- cgit