From 49355be32f69e3ca6d43e3135a3c6a61d0485651 Mon Sep 17 00:00:00 2001 From: delarea Date: Sun, 17 Nov 2024 12:05:17 +0200 Subject: [PATCH] Fix static check --- src/main/java/io/jenkins/plugins/jfrog/JfStep.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/main/java/io/jenkins/plugins/jfrog/JfStep.java b/src/main/java/io/jenkins/plugins/jfrog/JfStep.java index 3ffb49f2..7212612f 100644 --- a/src/main/java/io/jenkins/plugins/jfrog/JfStep.java +++ b/src/main/java/io/jenkins/plugins/jfrog/JfStep.java @@ -289,13 +289,6 @@ private void addConfigArguments(ArgumentListBuilder builder, JFrogPlatformInstan } } - private void addConfigArguments(ArgumentListBuilder builder, JFrogPlatformInstance jfrogPlatformInstance, String jfrogBinaryPath, Job job, Launcher.ProcStarter launcher) throws IOException { - builder.add(jfrogBinaryPath).add("c").add("add").add(jfrogPlatformInstance.getId()); - addCredentialsArguments(builder, jfrogPlatformInstance, job, launcher); - addUrlArguments(builder, jfrogPlatformInstance); - builder.add("--interactive=false").add("--overwrite=true"); - } - static void addCredentialsArguments(ArgumentListBuilder builder, JFrogPlatformInstance jfrogPlatformInstance, Job job, Launcher.ProcStarter launcher) throws IOException { String credentialsId = jfrogPlatformInstance.getCredentialsConfig().getCredentialsId(); StringCredentials accessTokenCredentials = PluginsUtils.accessTokenCredentialsLookup(credentialsId, job); @@ -313,7 +306,7 @@ static void addCredentialsArguments(ArgumentListBuilder builder, JFrogPlatformIn // Stdin support requires a minimum CLI version and excludes plugin launchers. // Plugin launchers may lose stdin input, causing command failure; // hence, stdin is unsupported without plugin-specific handling. - private static void addPasswordArgument(ArgumentListBuilder builder, Credentials credentials, Launcher.ProcStarter launcher) throws IOException { + static void addPasswordArgument(ArgumentListBuilder builder, Credentials credentials, Launcher.ProcStarter launcher) throws IOException { if (passwordStdinSupported) { // Use stdin builder.add("--password-stdin"); @@ -326,7 +319,7 @@ private static void addPasswordArgument(ArgumentListBuilder builder, Credentials } } - private static void addUrlArguments(ArgumentListBuilder builder, JFrogPlatformInstance jfrogPlatformInstance) { + static void addUrlArguments(ArgumentListBuilder builder, JFrogPlatformInstance jfrogPlatformInstance) { builder.add("--url=" + jfrogPlatformInstance.getUrl()); builder.add("--artifactory-url=" + jfrogPlatformInstance.inferArtifactoryUrl()); builder.add("--distribution-url=" + jfrogPlatformInstance.inferDistributionUrl());