minor improvements on java client based on intellji ide (#13864)

This commit is contained in:
William Cheng
2022-10-30 23:31:04 +08:00
committed by GitHub
parent 684e7a063c
commit 4c19c725a7
44 changed files with 50 additions and 50 deletions

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -751,7 +751,7 @@ public class ApiClient {
if (b.length() > 0) {
b.append(",");
}
b.append(String.valueOf(o));
b.append(o);
}
return b.toString();
} else {
@@ -1659,7 +1659,7 @@ public class ApiClient {
KeyStore caKeyStore = newEmptyKeyStore(password);
int index = 0;
for (Certificate certificate : certificates) {
String certificateAlias = "ca" + Integer.toString(index++);
String certificateAlias = "ca" + (index++);
caKeyStore.setCertificateEntry(certificateAlias, certificate);
}
trustManagerFactory.init(caKeyStore);

View File

@@ -69,7 +69,7 @@ if(hasProperty('target') && target == 'android') {
task.from variant.javaCompile.destinationDir
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
artifacts.add('archives', task);
artifacts.add('archives', task)
}
}

View File

@@ -65,7 +65,7 @@ if(hasProperty('target') && target == 'android') {
task.from variant.javaCompile.destinationDir
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
artifacts.add('archives', task);
artifacts.add('archives', task)
}
}

View File

@@ -591,7 +591,7 @@ public class ApiClient {
if (b.length() > 0) {
b.append(",");
}
b.append(String.valueOf(o));
b.append(o);
}
return b.toString();
} else {
@@ -1456,7 +1456,7 @@ public class ApiClient {
KeyStore caKeyStore = newEmptyKeyStore(password);
int index = 0;
for (Certificate certificate : certificates) {
String certificateAlias = "ca" + Integer.toString(index++);
String certificateAlias = "ca" + (index++);
caKeyStore.setCertificateEntry(certificateAlias, certificate);
}
trustManagerFactory.init(caKeyStore);

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -65,7 +65,7 @@ if(hasProperty('target') && target == 'android') {
task.from variant.javaCompile.destinationDir
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
artifacts.add('archives', task);
artifacts.add('archives', task)
}
}

View File

@@ -704,7 +704,7 @@ public class ApiClient {
if (b.length() > 0) {
b.append(",");
}
b.append(String.valueOf(o));
b.append(o);
}
return b.toString();
} else {
@@ -1534,7 +1534,7 @@ public class ApiClient {
KeyStore caKeyStore = newEmptyKeyStore(password);
int index = 0;
for (Certificate certificate : certificates) {
String certificateAlias = "ca" + Integer.toString(index++);
String certificateAlias = "ca" + (index++);
caKeyStore.setCertificateEntry(certificateAlias, certificate);
}
trustManagerFactory.init(caKeyStore);

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -65,7 +65,7 @@ if(hasProperty('target') && target == 'android') {
task.from variant.javaCompile.destinationDir
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
artifacts.add('archives', task);
artifacts.add('archives', task)
}
}

View File

@@ -687,7 +687,7 @@ public class ApiClient {
if (b.length() > 0) {
b.append(",");
}
b.append(String.valueOf(o));
b.append(o);
}
return b.toString();
} else {
@@ -1529,7 +1529,7 @@ public class ApiClient {
KeyStore caKeyStore = newEmptyKeyStore(password);
int index = 0;
for (Certificate certificate : certificates) {
String certificateAlias = "ca" + Integer.toString(index++);
String certificateAlias = "ca" + (index++);
caKeyStore.setCertificateEntry(certificateAlias, certificate);
}
trustManagerFactory.init(caKeyStore);

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -65,7 +65,7 @@ if(hasProperty('target') && target == 'android') {
task.from variant.javaCompile.destinationDir
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
artifacts.add('archives', task);
artifacts.add('archives', task)
}
}

View File

@@ -693,7 +693,7 @@ public class ApiClient {
if (b.length() > 0) {
b.append(",");
}
b.append(String.valueOf(o));
b.append(o);
}
return b.toString();
} else {
@@ -1535,7 +1535,7 @@ public class ApiClient {
KeyStore caKeyStore = newEmptyKeyStore(password);
int index = 0;
for (Certificate certificate : certificates) {
String certificateAlias = "ca" + Integer.toString(index++);
String certificateAlias = "ca" + (index++);
caKeyStore.setCertificateEntry(certificateAlias, certificate);
}
trustManagerFactory.init(caKeyStore);

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -65,7 +65,7 @@ if(hasProperty('target') && target == 'android') {
task.from variant.javaCompile.destinationDir
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
artifacts.add('archives', task);
artifacts.add('archives', task)
}
}

View File

@@ -712,7 +712,7 @@ public class ApiClient {
if (b.length() > 0) {
b.append(",");
}
b.append(String.valueOf(o));
b.append(o);
}
return b.toString();
} else {
@@ -1554,7 +1554,7 @@ public class ApiClient {
KeyStore caKeyStore = newEmptyKeyStore(password);
int index = 0;
for (Certificate certificate : certificates) {
String certificateAlias = "ca" + Integer.toString(index++);
String certificateAlias = "ca" + (index++);
caKeyStore.setCertificateEntry(certificateAlias, certificate);
}
trustManagerFactory.init(caKeyStore);

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}

View File

@@ -42,7 +42,7 @@ public class ServerConfiguration {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replaceAll("\\{" + name + "\\}", value);
url = url.replace("{" + name + "}", value);
}
return url;
}