Better code format for Java (okhttp-gson) client (#971)

* better code format for java okhttp client

* update java petstore samples
This commit is contained in:
William Cheng
2018-09-06 14:24:14 +08:00
committed by GitHub
parent 3abeb82685
commit 39c734fc25
56 changed files with 1055 additions and 709 deletions

View File

@@ -24,8 +24,12 @@ public class StringUtil {
*/
public static boolean containsIgnoreCase(String[] array, String value) {
for (String str : array) {
if (value == null && str == null) return true;
if (value != null && value.equalsIgnoreCase(str)) return true;
if (value == null && str == null) {
return true;
}
if (value != null && value.equalsIgnoreCase(str)) {
return true;
}
}
return false;
}
@@ -43,7 +47,9 @@ public class StringUtil {
*/
public static String join(String[] array, String separator) {
int len = array.length;
if (len == 0) return "";
if (len == 0) {
return "";
}
StringBuilder out = new StringBuilder();
out.append(array[0]);