From 9b771573ec2e492d3f044e8570e8d76670ec0d74 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 4 Mar 2014 13:31:59 +0100 Subject: [PATCH] Log4jWebConfigurer does not try to parse empty "log4jRefreshInterval" context-param Issue: SPR-11507 --- .../org/springframework/web/util/Log4jWebConfigurer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/web/util/Log4jWebConfigurer.java b/spring-web/src/main/java/org/springframework/web/util/Log4jWebConfigurer.java index 8b50ac6fda1..4861703930a 100644 --- a/spring-web/src/main/java/org/springframework/web/util/Log4jWebConfigurer.java +++ b/spring-web/src/main/java/org/springframework/web/util/Log4jWebConfigurer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import javax.servlet.ServletContext; import org.springframework.util.Log4jConfigurer; import org.springframework.util.ResourceUtils; +import org.springframework.util.StringUtils; /** * Convenience class that performs custom log4j initialization for web environments, @@ -136,7 +137,7 @@ public abstract class Log4jWebConfigurer { // Check whether refresh interval was specified. String intervalString = servletContext.getInitParameter(REFRESH_INTERVAL_PARAM); - if (intervalString != null) { + if (StringUtils.hasText(intervalString)) { // Initialize with refresh interval, i.e. with log4j's watchdog thread, // checking the file in the background. try {