commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r411893 - in /jakarta/commons/proper/chain/trunk: src/java/org/apache/commons/chain/ src/java/org/apache/commons/chain/web/ xdocs/
Date Mon, 05 Jun 2006 18:59:06 GMT
Author: niallp
Date: Mon Jun  5 11:59:05 2006
New Revision: 411893

URL: http://svn.apache.org/viewvc?rev=411893&view=rev
Log:
Fix for CHAIN-29 - Remove static Log instances

Modified:
    jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/CatalogFactory.java
    jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainListener.java
    jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainResources.java
    jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainServlet.java
    jakarta/commons/proper/chain/trunk/xdocs/changes.xml

Modified: jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/CatalogFactory.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/CatalogFactory.java?rev=411893&r1=411892&r2=411893&view=diff
==============================================================================
--- jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/CatalogFactory.java
(original)
+++ jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/CatalogFactory.java
Mon Jun  5 11:59:05 2006
@@ -41,12 +41,6 @@
 
 
     /**
-     * <p>The <code>Log</code> instance for this class.</p>
-     */
-    private static final Log log = LogFactory.getLog(CatalogFactory.class);
-
-
-    /**
      * <p>Values passed to the <code>getCommand(String)</code> method should
      * use this as the delimiter between the "catalog" name and the "command"
      * name.</p>
@@ -149,12 +143,14 @@
         if (catalogName != null) {
             catalog = this.getCatalog(catalogName);
             if (catalog == null) {
+                Log log = LogFactory.getLog(CatalogFactory.class);
                 log.warn("No catalog found for name: " + catalogName + ".");
                 return null;
             }
         } else {
             catalog = this.getCatalog();
             if (catalog == null) {
+                Log log = LogFactory.getLog(CatalogFactory.class);
                 log.warn("No default catalog found.");
                 return null;
             }
@@ -236,6 +232,5 @@
         return cl;
 
     }
-
 
 }

Modified: jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainListener.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainListener.java?rev=411893&r1=411892&r2=411893&view=diff
==============================================================================
--- jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainListener.java
(original)
+++ jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainListener.java
Mon Jun  5 11:59:05 2006
@@ -135,15 +135,6 @@
         "org.apache.commons.chain.RULE_SET";
 
 
-    // -------------------------------------------------------- Static Variables
-
-
-    /**
-     * <p>The <code>Log</code> instance for this class.</p>
-     */
-    private static final Log log = LogFactory.getLog(ChainListener.class);
-
-
     // ------------------------------------------ ServletContextListener Methods
 
 
@@ -174,6 +165,7 @@
      */
     public void contextInitialized(ServletContextEvent event) {
 
+        Log log = LogFactory.getLog(ChainListener.class);
         if (log.isInfoEnabled()) {
             log.info("Initializing chain listener");
         }

Modified: jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainResources.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainResources.java?rev=411893&r1=411892&r2=411893&view=diff
==============================================================================
--- jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainResources.java
(original)
+++ jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainResources.java
Mon Jun  5 11:59:05 2006
@@ -38,15 +38,6 @@
 final class ChainResources {
 
 
-    // -------------------------------------------------------- Static Variables
-
-
-    /**
-     * <p>The <code>Log</code> instance for this class.</p>
-     */
-    private static final Log log = LogFactory.getLog(ChainResources.class);
-
-
     // ---------------------------------------------------------- Static Methods
 
 
@@ -62,6 +53,7 @@
         if (resources == null) {
             return;
         }
+        Log log = LogFactory.getLog(ChainResources.class);
         ClassLoader loader =
             Thread.currentThread().getContextClassLoader();
         if (loader == null) {
@@ -107,6 +99,7 @@
         if (resources == null) {
             return;
         }
+        Log log = LogFactory.getLog(ChainResources.class);
         ClassLoader loader =
             Thread.currentThread().getContextClassLoader();
         if (loader == null) {
@@ -150,6 +143,7 @@
         if (resources == null) {
             return;
         }
+        Log log = LogFactory.getLog(ChainResources.class);
         String[] paths = getResourcePaths(resources);
         String path = null;
         try {
@@ -192,6 +186,7 @@
         if (resources == null) {
             return;
         }
+        Log log = LogFactory.getLog(ChainResources.class);
         String[] paths = getResourcePaths(resources);
         String path = null;
         try {

Modified: jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainServlet.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainServlet.java?rev=411893&r1=411892&r2=411893&view=diff
==============================================================================
--- jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainServlet.java
(original)
+++ jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/ChainServlet.java
Mon Jun  5 11:59:05 2006
@@ -132,15 +132,6 @@
         "org.apache.commons.chain.RULE_SET";
 
 
-    // -------------------------------------------------------- Static Variables
-
-
-    /**
-     * <p>The <code>Log</code> instance to use with this class.</p>
-     */
-    protected static final Log log = LogFactory.getLog(ChainServlet.class);
-
-
     // --------------------------------------------------------- Servlet Methods
 
 
@@ -168,6 +159,7 @@
      */
     public void init() throws ServletException {
 
+        Log log = LogFactory.getLog(ChainServlet.class);
         ServletConfig config = getServletConfig();
         ServletContext context = getServletContext();
         if (log.isInfoEnabled()) {

Modified: jakarta/commons/proper/chain/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/chain/trunk/xdocs/changes.xml?rev=411893&r1=411892&r2=411893&view=diff
==============================================================================
--- jakarta/commons/proper/chain/trunk/xdocs/changes.xml (original)
+++ jakarta/commons/proper/chain/trunk/xdocs/changes.xml Mon Jun  5 11:59:05 2006
@@ -39,6 +39,10 @@
   <body>
 
     <release version="1.1-SNAPSHOT" date="in SVN">
+      <action dev="niallp" type="fix" issue="CHAIN-29">
+         Remove Static <code>Log</code> instances - see
+         <a href="http://wiki.apache.org/jakarta-commons/Logging/StaticLog">here</a>.
+      </action>
       <action dev="niallp" type="fix" issue="CHAIN-11">
          <a href="http://svn.apache.org/viewvc?view=rev&amp;revision=409125">r
409125</a>
          Modify DispatchCommand so that it will compile using JDK 1.3 (remove JDK 1.4 method).



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message