diff --git a/pom.xml b/pom.xml index f7d43e4a..0d269d1c 100644 --- a/pom.xml +++ b/pom.xml @@ -1,84 +1,73 @@ + - 4.0.0 - - org.jenkins-ci.plugins - plugin - 3.15 - - - + 4.0.0 + + org.jenkins-ci.plugins + plugin + 3.25 + - extended-choice-parameter - hpi - 0.79-SNAPSHOT - Extended Choice Parameter Plug-In - http://wiki.jenkins-ci.org/display/JENKINS/Extended+Choice+Parameter+plugin + extended-choice-parameter + hpi + 0.79-SNAPSHOT + Extended Choice Parameter Plug-In + https://wiki.jenkins.io/display/JENKINS/Extended+Choice+Parameter+plugin - - - 2.60.3 - 8 - + + + 2.60.3 + 8 + - - - vimil - Vimil Saju - - + + + vimil + Vimil Saju + + - - - net.sf.opencsv - opencsv - 2.0 - + - org.jenkins-ci.plugins - jquery - 1.11.2-0 + net.sf.opencsv + opencsv + 2.0 - org.jenkins-ci.plugins - script-security - 1.19 - - - io.fastjson - boon - 0.33 - - + org.jenkins-ci.plugins + jquery + 1.11.2-0 + + + org.jenkins-ci.plugins + script-security + 1.19 + + + io.fastjson + boon + 0.33 + + + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + - - - - repo.jenkins-ci.org - http://repo.jenkins-ci.org/public/ - - + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + - - - repo.jenkins-ci.org - http://repo.jenkins-ci.org/public/ - - - - - maven.jenkins-ci.org - http://repo.jenkins-ci.org/releases/ - - - maven.jenkins-ci.org - http://repo.jenkins-ci.org/snapshots/ - - - - scm:git:ssh://git@github.com/jenkinsci/extended-choice-parameter-plugin.git - scm:git:ssh://git@github.com/jenkinsci/extended-choice-parameter-plugin.git - https://github.com/jenkinsci/extended-choice-parameter-plugin - extended-choice-parameter-0.66 - + + scm:git:ssh://git@github.com/jenkinsci/extended-choice-parameter-plugin.git + scm:git:ssh://git@github.com/jenkinsci/extended-choice-parameter-plugin.git + https://github.com/jenkinsci/extended-choice-parameter-plugin + extended-choice-parameter-0.66 + diff --git a/src/main/java/com/cwctravel/hudson/plugins/extended_choice_parameter/ExtendedChoiceParameterDefinition.java b/src/main/java/com/cwctravel/hudson/plugins/extended_choice_parameter/ExtendedChoiceParameterDefinition.java index a91a1e79..96b24025 100644 --- a/src/main/java/com/cwctravel/hudson/plugins/extended_choice_parameter/ExtendedChoiceParameterDefinition.java +++ b/src/main/java/com/cwctravel/hudson/plugins/extended_choice_parameter/ExtendedChoiceParameterDefinition.java @@ -789,16 +789,7 @@ private synchronized GroovyShell getGroovyShell(String groovyClasspath) { contextField.setAccessible(true); contextField.set(groovyShell, groovyBinding); } - catch(NoSuchFieldException e) { - LOGGER.log(Level.SEVERE, e.getMessage(), e); - } - catch(SecurityException e) { - LOGGER.log(Level.SEVERE, e.getMessage(), e); - } - catch(IllegalArgumentException e) { - LOGGER.log(Level.SEVERE, e.getMessage(), e); - } - catch(IllegalAccessException e) { + catch(NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); } @@ -1027,12 +1018,12 @@ public String getMultiLevelDropdownIds() throws Exception { /* dropdownIds is of a form like this: return name + " dropdown MultiLevelMultiSelect 0," - // next select the source of the genome -- each genome gets a seperate dropdown id:" + // next select the source of the genome -- each genome gets a separate dropdown id:" + name + " dropdown MultiLevelMultiSelect 0 HG18,dropdown MultiLevelMultiSelect 0 ZZ23," - // next select the cell type of the source -- each source gets a seperate dropdown id + // next select the cell type of the source -- each source gets a separate dropdown id + name + " dropdown MultiLevelMultiSelect 0 HG18 Diffuse large B-cell lymphoma, dropdown MultiLevelMultiSelect 0 HG18 Multiple Myeloma," + name + " dropdown MultiLevelMultiSelect 0 ZZ23 Neuroblastoma," - // next select the name from the cell type -- each cell type gets a seperate dropdown id + // next select the name from the cell type -- each cell type gets a separate dropdown id + name + " dropdown MultiLevelMultiSelect 0 HG18 Diffuse large B-cell lymphoma LY1," + name + " dropdown MultiLevelMultiSelect 0 HG18 Multiple Myeloma MM1S," + name + " dropdown MultiLevelMultiSelect 0 ZZ23 Neuroblastoma BE2C," @@ -1275,10 +1266,7 @@ else if(!StringUtils.isBlank(descriptionGroovyScriptFile)) { result = !checkScriptApproval(script, descriptionGroovyClasspath, true); } } - catch(IOException e) { - LOGGER.log(Level.SEVERE, e.getMessage(), e); - } - catch(URISyntaxException e) { + catch(IOException | URISyntaxException e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); } return result; @@ -1302,10 +1290,7 @@ private boolean checkScriptApproval(String groovyScript, String groovyClasspath, scriptApproval.configuring(groovyScript, GroovyLanguage.get(), ApprovalContext.create()); scriptApproval.using(groovyScript, GroovyLanguage.get()); } - catch(UnapprovedUsageException uUE) { - result = false; - } - catch(UnapprovedClasspathException uCE) { + catch(UnapprovedUsageException | UnapprovedClasspathException e) { result = false; } @@ -1317,10 +1302,7 @@ private boolean checkScriptApproval(String groovyScript, String groovyClasspath, try { scriptApproval.using(classpathDirDigestEntry); } - catch(UnapprovedUsageException uUE) { - result = false; - } - catch(UnapprovedClasspathException uCE) { + catch(UnapprovedUsageException | UnapprovedClasspathException e) { result = false; } } @@ -1332,10 +1314,7 @@ private boolean checkScriptApproval(String groovyScript, String groovyClasspath, try { scriptApproval.using(classpathEntry); } - catch(UnapprovedUsageException uUE) { - result = false; - } - catch(UnapprovedClasspathException uCE) { + catch(UnapprovedUsageException | UnapprovedClasspathException e) { result = false; } } @@ -1492,10 +1471,7 @@ public Object getJSONEditorOptions() { result = executeGroovyScript(script, bindings, groovyClasspath); } - catch(IOException e) { - LOGGER.log(Level.SEVERE, e.getMessage(), e); - } - catch(URISyntaxException e) { + catch(IOException | URISyntaxException e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); } return result; @@ -1517,10 +1493,7 @@ private String expandVariables(String input) { } result = Util.replaceMacro(input, envVars); } - catch(IOException e) { - LOGGER.log(Level.SEVERE, e.getMessage(), e); - } - catch(InterruptedException e) { + catch(IOException | InterruptedException e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); } } diff --git a/src/main/java/com/cwctravel/hudson/plugins/extended_choice_parameter/ExtendedChoiceParameterValue.java b/src/main/java/com/cwctravel/hudson/plugins/extended_choice_parameter/ExtendedChoiceParameterValue.java index d6bfa1cd..17325b89 100644 --- a/src/main/java/com/cwctravel/hudson/plugins/extended_choice_parameter/ExtendedChoiceParameterValue.java +++ b/src/main/java/com/cwctravel/hudson/plugins/extended_choice_parameter/ExtendedChoiceParameterValue.java @@ -41,7 +41,7 @@ public String resolve(String name) { ParametersDefinitionProperty parametersDefinitionProperty = build.getProject().getProperty(ParametersDefinitionProperty.class); if(parametersDefinitionProperty != null) { ParameterDefinition parameterDefinition = parametersDefinitionProperty.getParameterDefinition(name); - if(parameterDefinition != null && parameterDefinition instanceof ExtendedChoiceParameterDefinition) { + if(parameterDefinition instanceof ExtendedChoiceParameterDefinition) { ExtendedChoiceParameterDefinition extendedChoiceParameterDefinition = (ExtendedChoiceParameterDefinition)parameterDefinition; if(ExtendedChoiceParameterDefinition.PARAMETER_TYPE_JSON.equals(extendedChoiceParameterDefinition.getType()) && extendedChoiceParameterDefinition.isSaveJSONParameterToFile()) { File jsonParametersDir = new File(build.getRootDir(), "parameters");