You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ java -jar google-java-format-1.22.0-all-deps.jar T.java
package com.google.errorprone.bugpatterns;
class T {
private static <V> void add(JsonNode jsonNode, String key, V value) {
switch (value) {
case String s -> ((ObjectNode) jsonNode).put(key, s);
case Short i -> ((ObjectNode) jsonNode).put(key, i);
case Integer i -> ((ObjectNode) jsonNode).put(key, i);
case Long l -> ((ObjectNode) jsonNode).put(key, 1);
case Float v -> ((ObjectNode) jsonNode).put(key, v);
case Double v -> ((ObjectNode) jsonNode).put(key, v);
case BigDecimal bigDecimal -> ((ObjectNode) jsonNode).put(key, bigDecimal);
case BigInteger bigInteger -> ((ObjectNode) jsonNode).put(key, bigInteger);
case Boolean b -> ((ObjectNode) jsonNode).put(key, b);
case byte[] bytes -> ((ObjectNode) jsonNode).put(key, bytes);
case null, default -> ((ObjectNode) jsonNode).put(key, to(value));
}
}
}
The text was updated successfully, but these errors were encountered: