Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/jasper/security/SecurityClassLoad.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/security/SecurityClassLoad.java?rev=1832695&r1=1832694&r2=1832695&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/jasper/security/SecurityClassLoad.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/security/SecurityClassLoad.java 
Fri Jun  1 15:33:56 2018
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,6 +18,9 @@
 
 package org.apache.jasper.security;
 
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+
 /**
  * Static class used to preload java classes when using the
  * Java SecurityManager so that the defineClassInPackage
@@ -28,9 +31,6 @@ package org.apache.jasper.security;
 
 public final class SecurityClassLoad {
 
-    private static final org.apache.juli.logging.Log log=
-        org.apache.juli.logging.LogFactory.getLog( SecurityClassLoad.class );
-
     public static void securityClassLoad(ClassLoader loader){
 
         if( System.getSecurityManager() == null ){
@@ -46,7 +46,7 @@ public final class SecurityClassLoad {
 
             loader.loadClass( basePackage +
                 "runtime.JspRuntimeLibrary");
-            
+
             loader.loadClass( basePackage +
                 "runtime.ServletResponseWrapperInclude");
             loader.loadClass( basePackage +
@@ -61,16 +61,17 @@ public final class SecurityClassLoad {
             loadAnonymousInnerClasses(loader, basePackage + 
"runtime.PageContextImpl");
 
             loader.loadClass( basePackage +
-                "runtime.JspContextWrapper");   
+                "runtime.JspContextWrapper");
 
             // Trigger loading of class and reading of property
             SecurityUtil.isPackageProtectionEnabled();
-            
+
             loader.loadClass( basePackage +
                 "servlet.JspServletWrapper");
 
             loadAnonymousInnerClasses(loader, "runtime.JspWriterImpl");
         } catch (ClassNotFoundException ex) {
+            Log log = LogFactory.getLog(SecurityClassLoad.class);
             log.error("SecurityClassLoad", ex);
         }
     }

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java?rev=1832695&r1=1832694&r2=1832695&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java
 Fri Jun  1 15:33:56 2018
@@ -36,7 +36,6 @@ import org.xml.sax.ext.EntityResolver2;
  */
 public class DigesterFactory {
 
-    private static final Log log = LogFactory.getLog(DigesterFactory.class);
     private static final StringManager sm =
             StringManager.getManager(Constants.PACKAGE_NAME);
 
@@ -135,6 +134,7 @@ public class DigesterFactory {
             location = CLASS_JSP_CONTEXT.getResource("resources/" + name);
         }
         if (location == null) {
+            Log log = LogFactory.getLog(DigesterFactory.class);
             log.warn(sm.getString("digesterFactory.missingSchema", name));
             return null;
         }

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/GenericParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/GenericParser.java?rev=1832695&r1=1832694&r2=1832695&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/GenericParser.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/GenericParser.java 
Fri Jun  1 15:33:56 2018
@@ -5,15 +5,15 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- */ 
+ */
 
 
 package org.apache.tomcat.util.digester;
@@ -38,12 +38,6 @@ import org.xml.sax.SAXNotRecognizedExcep
 public class GenericParser{
 
     /**
-     * The Log to which all SAX event related logging calls will be made.
-     */
-    private static final Log log =
-        LogFactory.getLog("org.apache.tomcat.util.digester.Digester.sax");
-
-    /**
      * The JAXP 1.2 property required to set up the schema location.
      */
     private static final String JAXP_SCHEMA_SOURCE =
@@ -61,11 +55,11 @@ public class GenericParser{
      * @return an XML Schema/DTD enabled <code>SAXParser</code>
      */
     public static SAXParser newSAXParser(Properties properties)
-            throws ParserConfigurationException, 
+            throws ParserConfigurationException,
                    SAXException,
-                   SAXNotRecognizedException{ 
+                   SAXNotRecognizedException{
 
-        SAXParserFactory factory = 
+        SAXParserFactory factory =
                         (SAXParserFactory)properties.get("SAXParserFactory");
         SAXParser parser = factory.newSAXParser();
         String schemaLocation = (String)properties.get("schemaLocation");
@@ -77,8 +71,8 @@ public class GenericParser{
                 parser.setProperty(JAXP_SCHEMA_SOURCE, schemaLocation);
             }
         } catch (SAXNotRecognizedException e){
-            log.info(parser.getClass().getName() + ": "  
-                                        + e.getMessage() + " not supported."); 
+            Log log = 
LogFactory.getLog("org.apache.tomcat.util.digester.Digester.sax");
+            log.info(parser.getClass().getName() + ": " + e.getMessage() + " 
not supported.");
         }
         return parser;
     }

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/XercesParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/XercesParser.java?rev=1832695&r1=1832694&r2=1832695&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/XercesParser.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/XercesParser.java 
Fri Jun  1 15:33:56 2018
@@ -5,15 +5,15 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- */ 
+ */
 
 
 package org.apache.tomcat.util.digester;
@@ -34,7 +34,7 @@ import org.xml.sax.SAXNotSupportedExcept
 /**
  * Create a <code>SAXParser</code> based on the underlying Xerces version.
  * Currently, Xerces 2.3 and up doesn't implement schema validation the same 
way
- * 2.1 was. In other to support schema validation in a portable way between 
+ * 2.1 was. In other to support schema validation in a portable way between
  * parser, some features/properties need to be set.
  *
  * @since 1.6
@@ -43,13 +43,6 @@ import org.xml.sax.SAXNotSupportedExcept
 public class XercesParser{
 
     /**
-     * The Log to which all SAX event related logging calls will be made.
-     */
-    private static final Log log =
-        LogFactory.getLog("org.apache.tomcat.util.digester.Digester.sax");
-
-
-    /**
      * The JAXP 1.2 property required to set up the schema location.
      */
     private static final String JAXP_SCHEMA_SOURCE =
@@ -66,7 +59,7 @@ public class XercesParser{
     /**
      * Xerces dynamic validation property
      */
-    protected static String XERCES_DYNAMIC = 
+    protected static String XERCES_DYNAMIC =
         "http://apache.org/xml/features/validation/dynamic";;
 
 
@@ -98,14 +91,14 @@ public class XercesParser{
         String versionNumber = "1.0";
         try{
             // Use reflection to avoid a build dependency with Xerces.
-            Class<?> versionClass = 
+            Class<?> versionClass =
                             Class.forName("org.apache.xerces.impl.Version");
             // Will return Xerces-J 2.x.0
-            Method method = 
-                versionClass.getMethod("getVersion", (Class[]) null); 
+            Method method =
+                versionClass.getMethod("getVersion", (Class[]) null);
             String version = (String)method.invoke(null, (Object[]) null);
-            versionNumber = version.substring( "Xerces-J".length() , 
-                                               version.lastIndexOf('.') ); 
+            versionNumber = version.substring( "Xerces-J".length() ,
+                                               version.lastIndexOf('.') );
         } catch (Exception ex){
             // Do nothing.
         }
@@ -119,12 +112,12 @@ public class XercesParser{
      * @param properties parser specific properties/features
      * @return an XML Schema/DTD enabled <code>SAXParser</code>
      */
-    public static SAXParser newSAXParser(Properties properties) 
-            throws ParserConfigurationException, 
+    public static SAXParser newSAXParser(Properties properties)
+            throws ParserConfigurationException,
                    SAXException,
                    SAXNotSupportedException {
 
-        SAXParserFactory factory =  
+        SAXParserFactory factory =
                         (SAXParserFactory)properties.get("SAXParserFactory");
 
         if (versionNumber == null){
@@ -132,7 +125,7 @@ public class XercesParser{
             version = Float.parseFloat(versionNumber);
         }
 
-        // Note: 2.2 is completely broken (with XML Schema). 
+        // Note: 2.2 is completely broken (with XML Schema).
         if (version > 2.1) {
 
             configureXerces(factory);
@@ -148,12 +141,12 @@ public class XercesParser{
     /**
      * Configure schema validation as recommended by the JAXP 1.2 spec.
      * The <code>properties</code> object may contains information about
-     * the schema local and language. 
+     * the schema local and language.
      * @param properties parser optional info
      */
-    private static void configureOldXerces(SAXParser parser, 
-                                           Properties properties) 
-            throws ParserConfigurationException, 
+    private static void configureOldXerces(SAXParser parser,
+                                           Properties properties)
+            throws ParserConfigurationException,
                    SAXNotSupportedException {
 
         String schemaLocation = (String)properties.get("schemaLocation");
@@ -165,21 +158,21 @@ public class XercesParser{
                 parser.setProperty(JAXP_SCHEMA_SOURCE, schemaLocation);
             }
         } catch (SAXNotRecognizedException e){
-            log.info(parser.getClass().getName() + ": " 
-                                        + e.getMessage() + " not supported."); 
+            Log log = 
LogFactory.getLog("org.apache.tomcat.util.digester.Digester.sax");
+            log.info(parser.getClass().getName() + ": " + e.getMessage() + " 
not supported.");
         }
 
     }
 
 
     /**
-     * Configure schema validation as recommended by the Xerces spec. 
+     * Configure schema validation as recommended by the Xerces spec.
      * Both DTD and Schema validation will be enabled simultaneously.
      * @param factory SAXParserFactory to be configured
      */
     private static void configureXerces(SAXParserFactory factory)
-            throws ParserConfigurationException, 
-                   SAXNotRecognizedException, 
+            throws ParserConfigurationException,
+                   SAXNotRecognizedException,
                    SAXNotSupportedException {
 
         factory.setFeature(XERCES_DYNAMIC, true);

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java?rev=1832695&r1=1832694&r2=1832695&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java 
Fri Jun  1 15:33:56 2018
@@ -61,7 +61,7 @@ import org.apache.tomcat.util.res.String
  */
 public class StandardJarScanner implements JarScanner {
 
-    private static final Log log = LogFactory.getLog(StandardJarScanner.class);
+    private final Log log = LogFactory.getLog(StandardJarScanner.class);
 
     private static final Set<String> defaultJarsToSkip = new HashSet<String>();
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java?rev=1832695&r1=1832694&r2=1832695&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
 Fri Jun  1 15:33:56 2018
@@ -48,7 +48,7 @@ import org.apache.tomcat.util.res.String
  */
 public class AsyncChannelWrapperSecure implements AsyncChannelWrapper {
 
-    private static final Log log =
+    private final Log log =
             LogFactory.getLog(AsyncChannelWrapperSecure.class);
     private static final StringManager sm =
             StringManager.getManager(Constants.PACKAGE_NAME);

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/BackgroundProcessManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/BackgroundProcessManager.java?rev=1832695&r1=1832694&r2=1832695&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/BackgroundProcessManager.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/BackgroundProcessManager.java
 Fri Jun  1 15:33:56 2018
@@ -31,7 +31,7 @@ import org.apache.tomcat.util.res.String
  */
 public class BackgroundProcessManager {
 
-    private static final Log log =
+    private final Log log =
             LogFactory.getLog(BackgroundProcessManager.class);
     private static final StringManager sm =
             StringManager.getManager(Constants.PACKAGE_NAME);

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoEndpointBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoEndpointBase.java?rev=1832695&r1=1832694&r2=1832695&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoEndpointBase.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoEndpointBase.java
 Fri Jun  1 15:33:56 2018
@@ -39,7 +39,7 @@ import org.apache.tomcat.util.res.String
  */
 public abstract class PojoEndpointBase extends Endpoint {
 
-    private static final Log log = LogFactory.getLog(PojoEndpointBase.class);
+    private final Log log = LogFactory.getLog(PojoEndpointBase.class);
     private static final StringManager sm =
             StringManager.getManager(Constants.PACKAGE_NAME);
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsFrameServer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsFrameServer.java?rev=1832695&r1=1832694&r2=1832695&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsFrameServer.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsFrameServer.java 
Fri Jun  1 15:33:56 2018
@@ -29,7 +29,7 @@ import org.apache.tomcat.websocket.WsSes
 
 public class WsFrameServer extends WsFrameBase {
 
-    private static final Log log = LogFactory.getLog(WsFrameServer.class);
+    private final Log log = LogFactory.getLog(WsFrameServer.class);
     private static final StringManager sm = 
StringManager.getManager(Constants.PACKAGE_NAME);
 
     private final AbstractServletInputStream sis;

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java?rev=1832695&r1=1832694&r2=1832695&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java
 Fri Jun  1 15:33:56 2018
@@ -46,10 +46,8 @@ import org.apache.tomcat.websocket.WsSes
  */
 public class WsHttpUpgradeHandler implements HttpUpgradeHandler {
 
-    private static final Log log =
-            LogFactory.getLog(WsHttpUpgradeHandler.class);
-    private static final StringManager sm =
-            StringManager.getManager(Constants.PACKAGE_NAME);
+    private final Log log = LogFactory.getLog(WsHttpUpgradeHandler.class);
+    private static final StringManager sm = 
StringManager.getManager(WsHttpUpgradeHandler.class);
 
     private final ClassLoader applicationClassLoader;
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java?rev=1832695&r1=1832694&r2=1832695&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
 Fri Jun  1 15:33:56 2018
@@ -43,7 +43,7 @@ public class WsRemoteEndpointImplServer
 
     private static final StringManager sm =
             StringManager.getManager(Constants.PACKAGE_NAME);
-    private static final Log log = 
LogFactory.getLog(WsRemoteEndpointImplServer.class);
+    private final Log log = 
LogFactory.getLog(WsRemoteEndpointImplServer.class);
 
     private static final Queue<OnResultRunnable> onResultRunnables =
             new ConcurrentLinkedQueue<OnResultRunnable>();

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsSci.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsSci.java?rev=1832695&r1=1832694&r2=1832695&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsSci.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsSci.java Fri 
Jun  1 15:33:56 2018
@@ -46,8 +46,7 @@ public class WsSci implements ServletCon
 
     private static boolean logMessageWritten = false;
 
-    private static final Log log =
-            LogFactory.getLog(WsSci.class);
+    private final Log log = LogFactory.getLog(WsSci.class);
     private static final StringManager sm =
             StringManager.getManager(Constants.PACKAGE_NAME);
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java?rev=1832695&r1=1832694&r2=1832695&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
 Fri Jun  1 15:33:56 2018
@@ -74,7 +74,7 @@ public class WsServerContainer extends W
 
     private static final StringManager sm =
             StringManager.getManager(Constants.PACKAGE_NAME);
-    private static final Log log = LogFactory.getLog(WsServerContainer.class);
+    private final Log log = LogFactory.getLog(WsServerContainer.class);
 
     private static final CloseReason AUTHENTICATED_HTTP_SESSION_CLOSED =
             new CloseReason(CloseCodes.VIOLATED_POLICY,

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1832695&r1=1832694&r2=1832695&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Jun  1 15:33:56 2018
@@ -89,6 +89,11 @@
         Correct the manifest for the annotations-api.jar. The JAR implements 
the
         Common Annotations API 1.1 and the manifest should reflect that. 
(markt)
       </fix>
+      <fix>
+        Switch to non-static loggers where there is a possibility of a logger
+        becoming associated with a web application class loader causing log
+        messages to be lost if the web application is stopped. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to