diff --git a/agent/src/main/java/com/walmartlabs/concord/agent/executors/runner/JobDependencies.java b/agent/src/main/java/com/walmartlabs/concord/agent/executors/runner/JobDependencies.java index a2e0f47364..1dc5e5ebdf 100644 --- a/agent/src/main/java/com/walmartlabs/concord/agent/executors/runner/JobDependencies.java +++ b/agent/src/main/java/com/walmartlabs/concord/agent/executors/runner/JobDependencies.java @@ -186,7 +186,7 @@ private static Map getDependencyVersionsFromFile(RunnerJob job) } private static boolean isLatestVersion(String v) { - return v.equalsIgnoreCase("latest"); + return "latest".equalsIgnoreCase(v); } private static String assertVersion(String dep, Map versions) { diff --git a/plugins/tasks/lock/src/main/java/com/walmartlabs/concord/plugins/lock/LockTaskCommon.java b/plugins/tasks/lock/src/main/java/com/walmartlabs/concord/plugins/lock/LockTaskCommon.java index 408905eb9e..795386ee00 100644 --- a/plugins/tasks/lock/src/main/java/com/walmartlabs/concord/plugins/lock/LockTaskCommon.java +++ b/plugins/tasks/lock/src/main/java/com/walmartlabs/concord/plugins/lock/LockTaskCommon.java @@ -82,8 +82,8 @@ private String checkScope(String scope) { return null; } - if (!scope.equalsIgnoreCase("ORG") - && !scope.equalsIgnoreCase("PROJECT")) { + if (!"ORG".equalsIgnoreCase(scope) + && !"PROJECT".equalsIgnoreCase(scope)) { throw new IllegalArgumentException("Unknown scope '" + scope + "', expected: org or project"); } diff --git a/runtime/v1/impl/src/main/java/com/walmartlabs/concord/runner/ConcordSecurityManager.java b/runtime/v1/impl/src/main/java/com/walmartlabs/concord/runner/ConcordSecurityManager.java index bbc013c54c..43b196ffa0 100644 --- a/runtime/v1/impl/src/main/java/com/walmartlabs/concord/runner/ConcordSecurityManager.java +++ b/runtime/v1/impl/src/main/java/com/walmartlabs/concord/runner/ConcordSecurityManager.java @@ -60,7 +60,7 @@ public void checkPermission(Permission perm) { String path = perm.getName(); // allow all local paths - if (!path.startsWith("/") && !path.equals(ALL_FILES_TOKEN)) { + if (!path.startsWith("/") && !ALL_FILES_TOKEN.equals(path)) { return; } diff --git a/runtime/v1/project-model/src/main/java/com/walmartlabs/concord/project/yaml/converter/StepConverter.java b/runtime/v1/project-model/src/main/java/com/walmartlabs/concord/project/yaml/converter/StepConverter.java index e95258a534..f98fbf53b6 100644 --- a/runtime/v1/project-model/src/main/java/com/walmartlabs/concord/project/yaml/converter/StepConverter.java +++ b/runtime/v1/project-model/src/main/java/com/walmartlabs/concord/project/yaml/converter/StepConverter.java @@ -278,7 +278,7 @@ default Set getVarMap(Map options, String key) result.add(new VariableMapping(null, sourceExpr, sourceValue, target, true)); } - if (key.equals("in") && getWithItems(options) != null) { + if ("in".equals(key) && getWithItems(options) != null) { result = appendWithItemsVar(result); } return result; diff --git a/server/impl/src/main/java/com/walmartlabs/concord/server/org/project/ProjectValidator.java b/server/impl/src/main/java/com/walmartlabs/concord/server/org/project/ProjectValidator.java index 346362def5..bbf7d5a067 100644 --- a/server/impl/src/main/java/com/walmartlabs/concord/server/org/project/ProjectValidator.java +++ b/server/impl/src/main/java/com/walmartlabs/concord/server/org/project/ProjectValidator.java @@ -95,7 +95,7 @@ private static String getEntryPoint(Trigger t) { private static void validateSpec(Trigger t, List errors) { String triggerName = t.name(); - if (!triggerName.equals("cron")) { + if (!"cron".equals(triggerName)) { return; } @@ -121,7 +121,7 @@ private static void validateSpec(Trigger t, List errors) { private static void validateTimezone(Trigger t, List errors) { String triggerName = t.name(); - if (!triggerName.equals("cron")) { + if (!"cron".equals(triggerName)) { return; } diff --git a/server/impl/src/main/java/com/walmartlabs/concord/server/user/UserManager.java b/server/impl/src/main/java/com/walmartlabs/concord/server/user/UserManager.java index a618a31d3d..85c29fb7fa 100644 --- a/server/impl/src/main/java/com/walmartlabs/concord/server/user/UserManager.java +++ b/server/impl/src/main/java/com/walmartlabs/concord/server/user/UserManager.java @@ -260,7 +260,7 @@ private UserType assertUserType(String username, String domain, UserType type) { } private UserType assertSsoUserType(UserPrincipal u, UserType type) { - if (u.getRealm().equals(SSO_REALM_NAME)) { + if (SSO_REALM_NAME.equals(u.getRealm())) { if (userInfoProviders.get(UserType.SSO) != null) { return UserType.SSO; } diff --git a/server/liquibase-ext/src/main/java/com/walmartlabs/concord/server/liquibase/ext/ApiTokenCreator.java b/server/liquibase-ext/src/main/java/com/walmartlabs/concord/server/liquibase/ext/ApiTokenCreator.java index 4f7d9d477a..cb55a547bb 100644 --- a/server/liquibase-ext/src/main/java/com/walmartlabs/concord/server/liquibase/ext/ApiTokenCreator.java +++ b/server/liquibase-ext/src/main/java/com/walmartlabs/concord/server/liquibase/ext/ApiTokenCreator.java @@ -118,7 +118,7 @@ public String getConfirmationMessage() { @Override public void setUp() { - if (this.skip.equals("true")) { + if ("true".equals(this.skip)) { this.token = null; return; } diff --git a/server/plugins/oidc/src/main/java/com/walmartlabs/concord/server/plugins/oidc/OidcAuthenticationHandler.java b/server/plugins/oidc/src/main/java/com/walmartlabs/concord/server/plugins/oidc/OidcAuthenticationHandler.java index 5a6bb7479d..00d42a4da0 100644 --- a/server/plugins/oidc/src/main/java/com/walmartlabs/concord/server/plugins/oidc/OidcAuthenticationHandler.java +++ b/server/plugins/oidc/src/main/java/com/walmartlabs/concord/server/plugins/oidc/OidcAuthenticationHandler.java @@ -70,7 +70,7 @@ public AuthenticationToken createToken(ServletRequest request, ServletResponse r String header = req.getHeader(AUTHORIZATION_HEADER); if (header != null) { String[] as = header.split(" "); - if (as.length != 2 || !as[0].equals(HEADER_PREFIX)) { + if (as.length != 2 || !HEADER_PREFIX.equals(as[0])) { return null; }