Skip to content

Commit 690ea40

Browse files
committed
Replace Apache Commons Lang 2 with Java APIs due to removal from core and security issue
1 parent 29bc5b2 commit 690ea40

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.jenkins-ci.plugins</groupId>
66
<artifactId>plugin</artifactId>
7-
<version>5.27</version>
7+
<version>6.2116.v7501b_67dc517</version>
88
<relativePath />
99
</parent>
1010

@@ -29,6 +29,7 @@
2929
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
3030
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
3131
<ban-junit4-imports.skip>false</ban-junit4-imports.skip>
32+
<ban-commons-lang-2.skip>false</ban-commons-lang-2.skip>
3233
</properties>
3334

3435
<dependencyManagement>

src/main/java/com/cloudbees/jenkins/plugins/BitbucketJobProbe.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
import org.springframework.security.core.context.SecurityContext;
3030
import org.springframework.security.core.context.SecurityContextHolder;
31-
import org.apache.commons.lang.StringUtils;
31+
3232
import org.eclipse.jgit.transport.RemoteConfig;
3333
import org.eclipse.jgit.transport.URIish;
3434
import com.google.common.base.Objects;
@@ -194,7 +194,7 @@ private boolean match(SCM scm, URIish url, String overrideUrl) {
194194
}
195195

196196
// needed because bitbucket self hosted does not transfer any host information
197-
if (StringUtils.isEmpty(url.getHost())) {
197+
if (url.getHost() == null || url.getHost().isEmpty()) {
198198
urIish = urIish.setHost(url.getHost());
199199
}
200200

@@ -253,7 +253,7 @@ private boolean match(SCMSource scm, URIish url) {
253253
}
254254

255255
// needed because bitbucket self hosted does not transfer any host information
256-
if (StringUtils.isEmpty(url.getHost())) {
256+
if (url.getHost() == null || url.getHost().isEmpty()) {
257257
urIish = urIish.setHost(url.getHost());
258258
}
259259

0 commit comments

Comments
 (0)