From 64e79ba6922e85ba3f04ec0784a6354d6cc6a27d Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 30 Dec 2014 15:39:48 +0100 Subject: [PATCH] Use hasLength rather than hasText --- .../web/servlet/resource/ResourceHttpRequestHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java index 8516d0125c..e49cc2b66a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java @@ -316,7 +316,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator implements H locationPath = location.getURL().getPath(); } locationPath = (locationPath.endsWith("/") || - !StringUtils.hasText(locationPath) ? locationPath : locationPath + "/"); + !StringUtils.hasLength(locationPath) ? locationPath : locationPath + "/"); if (!resourcePath.startsWith(locationPath)) { return false; }