Skip to content

Commit 4aaec74

Browse files
committed
Use Paths util to concatenate url
1 parent f511073 commit 4aaec74

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/jenkinsci/plugins/workflow/cps/SnippetizerLink.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
import java.net.URI;
3737
import java.net.URISyntaxException;
38+
import java.nio.file.Paths;
3839
import java.util.logging.Level;
3940
import java.util.logging.Logger;
4041

@@ -80,7 +81,7 @@ public final String getDisplayUrl() {
8081

8182
Item i = req.findAncestorObject(Item.class);
8283

83-
return req.getContextPath() + '/' + (i == null ? "" : i.getUrl()) + u;
84+
return Paths.get( req.getContextPath(), i == null ? "" : i.getUrl(), u).toString();
8485
}
8586

8687
/**

0 commit comments

Comments
 (0)