Skip to content

Commit 9491084

Browse files
committed
Removes commons-lang:2.6 from core
1 parent ca08444 commit 9491084

File tree

4 files changed

+1
-27
lines changed

4 files changed

+1
-27
lines changed

bom/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,6 @@ THE SOFTWARE.
121121
<artifactId>commons-io</artifactId>
122122
<version>2.21.0</version>
123123
</dependency>
124-
<dependency>
125-
<groupId>commons-lang</groupId>
126-
<artifactId>commons-lang</artifactId>
127-
<version>2.6</version>
128-
</dependency>
129124
<dependency>
130125
<groupId>jakarta.servlet</groupId>
131126
<artifactId>jakarta.servlet-api</artifactId>

core/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,6 @@ THE SOFTWARE.
158158
<groupId>commons-io</groupId>
159159
<artifactId>commons-io</artifactId>
160160
</dependency>
161-
<dependency>
162-
<!-- Jenkins doesn't use this directly, but some plugins wanted to use the latest -->
163-
<groupId>commons-lang</groupId>
164-
<artifactId>commons-lang</artifactId>
165-
</dependency>
166161
<dependency>
167162
<groupId>io.jenkins.tools</groupId>
168163
<artifactId>bridge-method-annotation</artifactId>

core/src/main/java/hudson/Util.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
import jenkins.util.SystemProperties;
118118
import jenkins.util.io.PathRemover;
119119
import org.apache.commons.io.IOUtils;
120-
import org.apache.commons.lang.time.FastDateFormat;
121120
import org.apache.tools.ant.BuildException;
122121
import org.apache.tools.ant.Project;
123122
import org.apache.tools.ant.taskdefs.Copy;
@@ -1878,23 +1877,9 @@ public static void printRedirect(String contextPath, String redirectUrl, String
18781877
"<!--%n", Functions.htmlAttributeEscape(redirectUrl), message);
18791878
}
18801879

1881-
/**
1882-
* @deprecated use {@link #XS_DATETIME_FORMATTER2}
1883-
*/
1884-
@Deprecated
1885-
public static final FastDateFormat XS_DATETIME_FORMATTER = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss'Z'", new SimpleTimeZone(0, "GMT"));
1886-
18871880
public static final DateTimeFormatter XS_DATETIME_FORMATTER2 =
18881881
DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'").withZone(ZoneOffset.UTC);
18891882

1890-
// Note: RFC822 dates must not be localized!
1891-
/**
1892-
* @deprecated use {@link DateTimeFormatter#RFC_1123_DATE_TIME}
1893-
*/
1894-
@Deprecated
1895-
public static final FastDateFormat RFC822_DATETIME_FORMATTER
1896-
= FastDateFormat.getInstance("EEE, dd MMM yyyy HH:mm:ss Z", Locale.US);
1897-
18981883
private static final Logger LOGGER = Logger.getLogger(Util.class.getName());
18991884

19001885
/**

core/src/main/java/jenkins/security/csp/impl/CspDecorator.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import jenkins.security.csp.CspHeader;
3838
import jenkins.security.csp.CspHeaderDecider;
3939
import jenkins.security.csp.ReportingContext;
40-
import org.apache.commons.lang.StringUtils;
4140
import org.kohsuke.accmod.Restricted;
4241
import org.kohsuke.accmod.restrictions.NoExternalUse;
4342
import org.kohsuke.stapler.Ancestor;
@@ -74,7 +73,7 @@ public String getReportingEndpointsHeaderValue(HttpServletRequest req) {
7473
@CheckForNull
7574
/* package */ static String getReportingEndpoint(HttpServletRequest req) {
7675
Class<?> modelObjectClass = null;
77-
String restOfPath = StringUtils.removeStart(req.getRequestURI(), req.getContextPath());
76+
String restOfPath = req.getRequestURI().replaceFirst("^" + req.getContextPath(), "");
7877
final StaplerRequest2 staplerRequest2 = Stapler.getCurrentRequest2();
7978
if (staplerRequest2 != null) {
8079
final List<Ancestor> ancestors = staplerRequest2.getAncestors();

0 commit comments

Comments
 (0)