[FIX] Модификатор final всё равно нужен в ByteArrayToBase64TypeAdapter.

This commit is contained in:
Zaxar163 2019-06-11 12:18:25 +03:00
parent 0b6f4e516b
commit bbc48ec239

View file

@ -142,8 +142,8 @@ public static GsonBuilder newBuilder() {
private static class ByteArrayToBase64TypeAdapter implements JsonSerializer<byte[]>, JsonDeserializer<byte[]> {
private static final ByteArrayToBase64TypeAdapter INSTANCE = new ByteArrayToBase64TypeAdapter();
private Base64.Decoder decoder = Base64.getUrlDecoder();
private Base64.Encoder encoder = Base64.getUrlEncoder();
private final Base64.Decoder decoder = Base64.getUrlDecoder();
private final Base64.Encoder encoder = Base64.getUrlEncoder();
public byte[] deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
if (json.isJsonArray()) {
JsonArray byteArr = json.getAsJsonArray();