diff --git a/spring-framework-reference/src/mvc.xml b/spring-framework-reference/src/mvc.xml index 33df21a553..7059dce44f 100644 --- a/spring-framework-reference/src/mvc.xml +++ b/spring-framework-reference/src/mvc.xml @@ -1895,7 +1895,7 @@ public class TimeBasedAccessInterceptor extends HandlerInterceptorAdapter { Calendar cal = Calendar.getInstance(); int hour = cal.get(HOUR_OF_DAY); - if (openingTime <= hour < closingTime) { + if (openingTime <= hour && hour < closingTime) { return true; } else { response.sendRedirect("http://host.com/outsideOfficeHours.html");