Skip to content

Commit

Permalink
style: polish code to pass checkstyle
Browse files Browse the repository at this point in the history
1. polish code to pass checkstyle

Signed-off-by: TheR1sing3un <[email protected]>
  • Loading branch information
TheR1sing3un committed Oct 18, 2023
1 parent 366771d commit 784ab5f
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
public class ClientConfigurationFactory {
public static ClientConfiguration build(Account account) {
ClientConfiguration clientConfiguration;
if(account.getAclEnable()) {
if (account.getAclEnable()) {
StaticSessionCredentialsProvider staticSessionCredentialsProvider = new StaticSessionCredentialsProvider(account.getAccessKey(), account.getSecretKey());
clientConfiguration = ClientConfiguration.newBuilder()
.setEndpoints(account.getEndpoint())
.setRequestTimeout(Duration.ofSeconds(10))
.setCredentialProvider(staticSessionCredentialsProvider)
.build();
}else {
.setEndpoints(account.getEndpoint())
.setRequestTimeout(Duration.ofSeconds(10))
.setCredentialProvider(staticSessionCredentialsProvider)
.build();
} else {
clientConfiguration = ClientConfiguration.newBuilder()
.setEndpoints(account.getEndpoint())
.setRequestTimeout(Duration.ofSeconds(10))
.build();
.setEndpoints(account.getEndpoint())
.setRequestTimeout(Duration.ofSeconds(10))
.build();
}
return clientConfiguration;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class ResourceInit {
protected static String endPoint = null;
protected static String namesrvAddr = null;
protected static Boolean aclEnable = null;
protected static String ALL_IP;
protected static String allIp;
protected static String cluster;
protected static List<String> nameserverIpList = new ArrayList<>();
protected static List<String> brokerIpList = new ArrayList<>();
Expand Down Expand Up @@ -102,9 +102,9 @@ private static void initAcl() {
}

private static void initConnectionInfo() {
ALL_IP = System.getenv("ALL_IP");
if (ALL_IP != null) {
String[] allPodInfos = ALL_IP.split(",");
allIp = System.getenv("ALL_IP");
if (allIp != null) {
String[] allPodInfos = allIp.split(",");
for (String podInfo : allPodInfos) {
if (podInfo.contains("nameserver")) {
nameserverIpList.add(podInfo.substring(podInfo.indexOf(":") + 1));
Expand Down
Loading

0 comments on commit 784ab5f

Please sign in to comment.