Skip to content

Commit

Permalink
reduce code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
franvila committed Nov 10, 2023
1 parent 690c0f6 commit 0560cd4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
* The type Environment.
*/
public class Environment {

private Environment() {
}

/**
* Env. variables names
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public int getNumberOfReplicas() {
public String getBootstrap() {
String clusterIP = kubeClient().getService(deploymentNamespace, Constants.KROXY_SERVICE_NAME).getSpec().getClusterIP();
String bootstrap = clusterIP + ":9292";
LOGGER.debug("Kroxylicious bootstrap: " + bootstrap);
LOGGER.debug("Kroxylicious bootstrap: {}", bootstrap);
return bootstrap;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public boolean isClusterUp() {
return Exec.exec(cmd).isSuccess();
}
catch (KubeClusterException e) {
LOGGER.debug("'" + String.join(" ", cmd) + "' failed. Please double check connectivity to your cluster!");
String commandLine = String.join(" ", cmd);
LOGGER.debug("'{}' failed. Please double check connectivity to your cluster!", commandLine);
LOGGER.debug(String.valueOf(e));
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public abstract class BaseCmdKubeClient<K extends BaseCmdKubeClient<K>> implemen
protected static class Context implements AutoCloseable {
@Override
public void close() {
// Do nothing
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private <T extends HasMetadata> ResourceType<T> findResourceType(T resource) {
.getStatus();
if (status != null) {
return status.getConditions().stream()
.anyMatch(condition -> condition.getType().equals("Ready") && condition.getStatus().equals(conditionStatus.toString()));
.anyMatch(condition -> condition.getType().equals("Ready") && condition.getStatus().toUpperCase().equals(conditionStatus.toString()));
}
return false;
});
Expand Down

0 comments on commit 0560cd4

Please sign in to comment.