From 83afda59f93b5d9b45dd2db2910eb1b109339ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=8B=A9?= <923568791@qq.com> Date: Tue, 2 Jan 2024 16:25:12 +0800 Subject: [PATCH] code format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 西狩 <923568791@qq.com> --- .../client/json/JsonpMappingException.java | 1 - .../java/org/opensearch/client/json/JsonpUtils.java | 13 ++++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/java-client/src/main/java/org/opensearch/client/json/JsonpMappingException.java b/java-client/src/main/java/org/opensearch/client/json/JsonpMappingException.java index f410889d06..ee5e3a61db 100644 --- a/java-client/src/main/java/org/opensearch/client/json/JsonpMappingException.java +++ b/java-client/src/main/java/org/opensearch/client/json/JsonpMappingException.java @@ -149,4 +149,3 @@ private static JsonpMappingException from0(Throwable cause, Object ref, Object p return jme.prepend0(ref, pathItem); } } - diff --git a/java-client/src/main/java/org/opensearch/client/json/JsonpUtils.java b/java-client/src/main/java/org/opensearch/client/json/JsonpUtils.java index 899bc60c51..98c87b9e28 100644 --- a/java-client/src/main/java/org/opensearch/client/json/JsonpUtils.java +++ b/java-client/src/main/java/org/opensearch/client/json/JsonpUtils.java @@ -76,7 +76,7 @@ static JsonProvider findProvider() { RuntimeException exception; try { return JsonProvider.provider(); - } catch(RuntimeException re) { + } catch (RuntimeException re) { exception = re; } @@ -85,13 +85,13 @@ static JsonProvider findProvider() { try { return ServiceLoader.load(JsonProvider.class, JsonpUtils.class.getClassLoader()).iterator().next(); - } catch(Exception e) { + } catch (Exception e) { // ignore } try { return ServiceLoader.load(JsonProvider.class, JsonProvider.class.getClassLoader()).iterator().next(); - } catch(Exception e) { + } catch (Exception e) { // ignore } @@ -148,7 +148,7 @@ public static void skipValue(JsonParser parser) { * Skip the value at the current position of the parser. */ public static void skipValue(JsonParser parser, Event event) { - switch(event) { + switch (event) { case START_OBJECT: parser.skipObject(); break; @@ -248,7 +248,10 @@ public static void serialize(T value, JsonGenerator generator, @Nullable Jso * (the object has been consumed from the original one). */ public static Map.Entry lookAheadFieldValue( - String name, String defaultValue, JsonParser parser, JsonpMapper mapper + String name, + String defaultValue, + JsonParser parser, + JsonpMapper mapper ) { JsonLocation location = parser.getLocation();