Skip to content

Commit 1d82ff9

Browse files
committed
Bump jenkins version to 2.462.3
1 parent 6cbaa08 commit 1d82ff9

9 files changed

+37
-16
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<properties>
2929
<changelist>999999-SNAPSHOT</changelist>
3030
<gitHubRepo>jenkinsci/bitbucket-branch-source-plugin</gitHubRepo>
31-
<jenkins.version>2.440.3</jenkins.version>
31+
<jenkins.version>2.462.3</jenkins.version>
3232
<hpi.compatibleSinceVersion>2.0</hpi.compatibleSinceVersion>
3333
<useBeta>true</useBeta> <!-- Jenkins.MANAGE -->
3434
</properties>
@@ -63,8 +63,8 @@
6363
<dependencies>
6464
<dependency>
6565
<groupId>io.jenkins.tools.bom</groupId>
66-
<artifactId>bom-2.440.x</artifactId>
67-
<version>3221.ve8f7b_fdd149d</version>
66+
<artifactId>bom-2.462.x</artifactId>
67+
<version>3559.vb_5b_81183b_d23</version>
6868
<scope>import</scope>
6969
<type>pom</type>
7070
</dependency>

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/api/credentials/BitbucketAccessTokenAuthenticator.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.cloudbees.plugins.credentials.CredentialsScope;
55
import com.cloudbees.plugins.credentials.common.StandardUsernameCredentials;
66
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
7+
import hudson.model.Descriptor.FormException;
78
import hudson.util.Secret;
89
import org.apache.commons.lang.StringUtils;
910
import org.apache.http.HttpHeaders;
@@ -38,7 +39,11 @@ public void configureRequest(HttpRequest request) {
3839

3940
@Override
4041
public StandardUsernameCredentials getCredentialsForScm() {
41-
return new UsernamePasswordCredentialsImpl(
42-
CredentialsScope.GLOBAL, null, null, StringUtils.EMPTY, token.getPlainText());
42+
try {
43+
return new UsernamePasswordCredentialsImpl(
44+
CredentialsScope.GLOBAL, null, null, StringUtils.EMPTY, token.getPlainText());
45+
} catch (FormException e) {
46+
throw new RuntimeException(e);
47+
}
4348
}
4449
}

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/api/credentials/BitbucketOAuthAuthenticator.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.cloudbees.plugins.credentials.common.StandardUsernameCredentials;
66
import com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials;
77
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
8+
import hudson.model.Descriptor.FormException;
89
import org.apache.commons.lang.StringUtils;
910
import org.apache.http.HttpRequest;
1011
import org.scribe.model.OAuthConfig;
@@ -40,7 +41,11 @@ public void configureRequest(HttpRequest request) {
4041

4142
@Override
4243
public StandardUsernameCredentials getCredentialsForScm() {
43-
return new UsernamePasswordCredentialsImpl(
44-
CredentialsScope.GLOBAL, null, null, StringUtils.EMPTY, token.getToken());
44+
try {
45+
return new UsernamePasswordCredentialsImpl(
46+
CredentialsScope.GLOBAL, null, null, StringUtils.EMPTY, token.getToken());
47+
} catch (FormException e) {
48+
throw new RuntimeException(e);
49+
}
4550
}
4651
}

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/api/credentials/BitbucketUsernamePasswordAuthenticator.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import com.cloudbees.plugins.credentials.common.StandardUsernameCredentials;
3131
import com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials;
3232
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
33+
import hudson.model.Descriptor.FormException;
3334
import java.util.logging.Level;
3435
import java.util.logging.Logger;
3536
import org.apache.http.HttpHost;
@@ -80,7 +81,11 @@ public void configureContext(HttpClientContext context, HttpHost host) {
8081

8182
@Override
8283
public StandardUsernameCredentials getCredentialsForScm() {
83-
return new UsernamePasswordCredentialsImpl(
84-
CredentialsScope.GLOBAL, null, null, httpCredentials.getUserName(), httpCredentials.getPassword());
84+
try {
85+
return new UsernamePasswordCredentialsImpl(
86+
CredentialsScope.GLOBAL, null, null, httpCredentials.getUserName(), httpCredentials.getPassword());
87+
} catch (FormException e) {
88+
throw new RuntimeException(e);
89+
}
8590
}
8691
}

src/test/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketBuildStatusNotificationsTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import hudson.model.FreeStyleProject;
3737
import hudson.model.Result;
3838
import hudson.model.TaskListener;
39+
import hudson.model.Descriptor.FormException;
3940
import java.io.ByteArrayInputStream;
4041
import java.io.IOException;
4142
import java.net.URL;
@@ -183,7 +184,11 @@ public DummyWorkflowBranchProjectFactory(String dsl) {
183184

184185
@Override
185186
protected FlowDefinition createDefinition() {
186-
return new CpsFlowDefinition(dsl, true);
187+
try {
188+
return new CpsFlowDefinition(dsl, true);
189+
} catch (FormException e) {
190+
throw new RuntimeException(e);
191+
}
187192
}
188193

189194
@Override

src/test/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketGitSCMBuilderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class BitbucketGitSCMBuilderTest {
5656
private WorkflowMultiBranchProject owner;
5757

5858
@Before
59-
public void setUp() throws IOException {
59+
public void setUp() throws Exception {
6060
owner = j.createProject(WorkflowMultiBranchProject.class);
6161
source = new BitbucketSCMSource( "tester", "test-repo");
6262
owner.setSourcesList(Collections.singletonList(new BranchSource(source)));

src/test/java/com/cloudbees/jenkins/plugins/bitbucket/Security2033Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public void doClearWhenInvokedUsingGetMethodThenResourceNotFound() throws Except
163163
assertThat(page.getWebResponse().getContentAsString(), containsString("Stapler processed this HTTP request as follows, but couldn't find the resource to consume the request"));
164164
}
165165

166-
private void initCredentials() throws IOException {
166+
private void initCredentials() throws Exception {
167167
StandardUsernamePasswordCredentials key = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, "id", "desc", "username", "pass");
168168
SystemCredentialsProvider.getInstance().getCredentials().add(key);
169169

src/test/java/com/cloudbees/jenkins/plugins/bitbucket/endpoints/AbstractBitbucketEndpointDescriptorTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
3333
import com.damnhandy.uri.template.UriTemplate;
3434
import edu.umd.cs.findbugs.annotations.NonNull;
35+
import hudson.model.Descriptor.FormException;
3536
import hudson.util.ListBoxModel;
3637
import java.util.Collections;
3738
import java.util.List;
@@ -56,7 +57,7 @@ public void reset() {
5657
}
5758

5859
@Test
59-
public void given__cloudCredentials__when__listingForServer__then__noCredentials() {
60+
public void given__cloudCredentials__when__listingForServer__then__noCredentials() throws Exception {
6061
SystemCredentialsProvider.getInstance().setDomainCredentialsMap(Collections.singletonMap(
6162
new Domain("cloud", "bb cloud",
6263
Collections.<DomainSpecification>singletonList(new HostnameSpecification("bitbucket.org", ""))),
@@ -68,7 +69,7 @@ public void given__cloudCredentials__when__listingForServer__then__noCredentials
6869
}
6970

7071
@Test
71-
public void given__cloudCredentials__when__listingForCloud__then__credentials() {
72+
public void given__cloudCredentials__when__listingForCloud__then__credentials() throws Exception {
7273
SystemCredentialsProvider.getInstance().setDomainCredentialsMap(Collections.singletonMap(
7374
new Domain("cloud", "bb cloud",
7475
Collections.<DomainSpecification>singletonList(new HostnameSpecification("bitbucket.org", ""))),

src/test/java/com/cloudbees/jenkins/plugins/bitbucket/endpoints/AbstractBitbucketEndpointTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ public void given__manage_true__when__credentials__then__credentialsSet() {
7979
}
8080

8181
@Test
82-
public void given__mange__when__systemCredentials__then__credentialsFound() {
82+
public void given__mange__when__systemCredentials__then__credentialsFound() throws Exception {
8383
SystemCredentialsProvider.getInstance().setDomainCredentialsMap(Collections.singletonMap(Domain.global(),
8484
Collections.<Credentials>singletonList(new UsernamePasswordCredentialsImpl(
8585
CredentialsScope.SYSTEM, "dummy", "dummy", "user", "pass"))));
8686
assertThat(new Dummy(true, "dummy").credentials(), notNullValue());
8787
}
8888

8989
@Test
90-
public void given__mange__when__globalCredentials__then__credentialsFound() {
90+
public void given__mange__when__globalCredentials__then__credentialsFound() throws Exception {
9191
SystemCredentialsProvider.getInstance().setDomainCredentialsMap(Collections.singletonMap(Domain.global(),
9292
Collections.<Credentials>singletonList(new UsernamePasswordCredentialsImpl(
9393
CredentialsScope.GLOBAL, "dummy", "dummy", "user", "pass"))));

0 commit comments

Comments
 (0)