From 936326f4ab75bee9bd11e42976ef62c87f239307 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Tue, 1 Sep 2009 18:13:28 +0000 Subject: [PATCH] SEC-1180: Unreachable code inside UrlUtils.buildRequestUrl(...). Removed code block. --- .../org/springframework/security/web/util/UrlUtils.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/web/src/main/java/org/springframework/security/web/util/UrlUtils.java b/web/src/main/java/org/springframework/security/web/util/UrlUtils.java index d4f891dc6a..65e9ede82b 100644 --- a/web/src/main/java/org/springframework/security/web/util/UrlUtils.java +++ b/web/src/main/java/org/springframework/security/web/util/UrlUtils.java @@ -76,14 +76,7 @@ public final class UrlUtils { public static String buildRequestUrl(String servletPath, String requestURI, String contextPath, String pathInfo, String queryString) { - String uri = servletPath; - - if (uri == null) { - uri = requestURI; - uri = uri.substring(contextPath.length()); - } - - return uri + ((pathInfo == null) ? "" : pathInfo) + ((queryString == null) ? "" : ("?" + queryString)); + return servletPath + ((pathInfo == null) ? "" : pathInfo) + ((queryString == null) ? "" : ("?" + queryString)); } /**