Commits

Anonymous committed 77b5389

only log this (once) when it is actually being _used_

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@802e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/java/com/opensymphony/xwork/interceptor/component/ComponentInterceptor.java

 public class ComponentInterceptor extends AroundInterceptor {
     public static final String COMPONENT_MANAGER = "com.opensymphony.xwork.interceptor.component.ComponentManager";
     private static final Log LOG = LogFactory.getLog(ComponentInterceptor.class);
-
-    static {
-        LOG.info("WebWork's IoC has been deprecated, please use an alternative such as Spring");
-    }
+    private static boolean deprecationLogged = false;
 
     public void init() {
     }
     }
 
     protected void before(ActionInvocation dispatcher) throws Exception {
+        if (!deprecationLogged) {
+            LOG.info("WebWork's IoC has been deprecated, please use an alternative such as Spring");
+            deprecationLogged = true;
+        }
         ComponentManager container = (ComponentManager) ActionContext.getContext().get(COMPONENT_MANAGER);
 
         if (container != null) {