diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java b/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java index 40c050f79e5..b76eaea5ffb 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java @@ -79,7 +79,7 @@ public static Class> forName(String className) { } public static Class> _forName(String className) throws ClassNotFoundException { - switch(className){ + switch (className) { case "boolean": return boolean.class; case "byte": @@ -112,6 +112,7 @@ public static Class> _forName(String className) throws ClassNotFoundException return float[].class; case "double[]": return double[].class; + default: } try { return arrayForName(className); diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/json/JSON.java b/dubbo-common/src/main/java/org/apache/dubbo/common/json/JSON.java index 1d3aa8891d2..0903cfbc869 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/json/JSON.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/json/JSON.java @@ -579,6 +579,7 @@ private static Object parse(Reader reader, JSONVisitor handler, int expect) thro handler.objectItemValue(value, false); break; } + default: } } break; @@ -629,6 +630,7 @@ private static Object parse(Reader reader, JSONVisitor handler, int expect) thro handler.objectItemValue(value, false); break; } + default: } } break; diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/json/JSONWriter.java b/dubbo-common/src/main/java/org/apache/dubbo/common/json/JSONWriter.java index 094832134c0..6c6bf09c0fe 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/json/JSONWriter.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/json/JSONWriter.java @@ -275,6 +275,7 @@ private void beforeValue() throws IOException { case OBJECT_VALUE: mState.type = OBJECT; return; + default: } } diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/json/Yylex.java b/dubbo-common/src/main/java/org/apache/dubbo/common/json/Yylex.java index 8abb42d1ab2..822175e6031 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/json/Yylex.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/json/Yylex.java @@ -837,6 +837,7 @@ public JSONToken yylex() throws java.io.IOException, ParseException { return null; } else { zzScanError(ZZ_NO_MATCH); + break; } } } diff --git a/dubbo-rpc/dubbo-rpc-thrift/src/main/java/org/apache/dubbo/rpc/protocol/thrift/ThriftCodec.java b/dubbo-rpc/dubbo-rpc-thrift/src/main/java/org/apache/dubbo/rpc/protocol/thrift/ThriftCodec.java index 02c0699af2c..d171ce12435 100644 --- a/dubbo-rpc/dubbo-rpc-thrift/src/main/java/org/apache/dubbo/rpc/protocol/thrift/ThriftCodec.java +++ b/dubbo-rpc/dubbo-rpc-thrift/src/main/java/org/apache/dubbo/rpc/protocol/thrift/ThriftCodec.java @@ -66,11 +66,12 @@ *
* header fields in version 1 *