Skip to content

Commit 9be5bcd

Browse files
authored
Merge pull request #235 from basil/refresh
Require 2.479.1 or newer
2 parents 95b6725 + 22ca383 commit 9be5bcd

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

pom.xml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<parent>
3030
<groupId>org.jenkins-ci.plugins</groupId>
3131
<artifactId>plugin</artifactId>
32-
<version>4.88</version>
32+
<version>5.7</version>
3333
<relativePath />
3434
</parent>
3535

@@ -72,8 +72,8 @@
7272
<properties>
7373
<changelist>999999-SNAPSHOT</changelist>
7474
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
75-
<jenkins.baseline>2.440</jenkins.baseline>
76-
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
75+
<jenkins.baseline>2.479</jenkins.baseline>
76+
<jenkins.version>${jenkins.baseline}.1</jenkins.version>
7777
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
7878
</properties>
7979

@@ -95,11 +95,7 @@
9595
<dependency>
9696
<groupId>io.jenkins.tools.bom</groupId>
9797
<artifactId>bom-${jenkins.baseline}.x</artifactId>
98-
<!-- Last 2.426.x BOM version before a trilead api upgrade -->
99-
<!-- Trilead API upgrade breaks plugin compatibility tests due to poor handling of optional dependencies -->
100-
<!-- Do not change this without checking plugin BOM passes with new version -->
101-
<!-- https://github.com/jenkinsci/bom/pull/3404 -->
102-
<version>3234.v5ca_5154341ef</version>
98+
<version>3893.v213a_42768d35</version>
10399
<scope>import</scope>
104100
<type>pom</type>
105101
</dependency>

src/main/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/BasicSSHUserPassword.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import com.cloudbees.plugins.credentials.ResolveWith;
3030
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
3131
import edu.umd.cs.findbugs.annotations.NonNull;
32+
import hudson.model.Descriptor;
3233
import hudson.util.Secret;
3334

3435
/**
@@ -75,7 +76,12 @@ public Secret getPassword() {
7576

7677
@Override
7778
protected Object readResolve() {
78-
UsernamePasswordCredentialsImpl resolved = new UsernamePasswordCredentialsImpl(getScope(), getId(), getDescription(), getUsername(), getPassword().getEncryptedValue());
79+
UsernamePasswordCredentialsImpl resolved;
80+
try {
81+
resolved = new UsernamePasswordCredentialsImpl(getScope(), getId(), getDescription(), getUsername(), getPassword().getEncryptedValue());
82+
} catch (Descriptor.FormException e) {
83+
throw new RuntimeException(e);
84+
}
7985
resolved.setUsernameSecret(true);
8086
return resolved;
8187
}

0 commit comments

Comments
 (0)