This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit a4e58aced8b027b29b58d7ba3fe36dadcda0b2f8
Author: remm <r...@apache.org>
AuthorDate: Tue Feb 20 14:08:58 2024 +0100

    Cleanup fixmes
---
 .../apache/catalina/core/ApplicationContext.java   |  2 --
 .../catalina/core/ApplicationFilterFactory.java    | 10 ++++++++--
 .../apache/catalina/core/LocalStrings.properties   |  2 ++
 java/org/apache/catalina/core/StandardContext.java |  1 -
 java/org/apache/catalina/core/StandardWrapper.java |  2 --
 java/org/apache/catalina/mbeans/MBeanFactory.java  |  5 +----
 java/org/apache/catalina/mbeans/MBeanUtils.java    | 23 ----------------------
 .../apache/catalina/session/StandardSession.java   |  2 +-
 java/org/apache/catalina/startup/Bootstrap.java    |  3 ---
 .../org/apache/catalina/startup/ContextConfig.java |  3 +--
 .../apache/catalina/valves/JsonAccessLogValve.java |  2 --
 java/org/apache/naming/NamingContext.java          |  1 -
 12 files changed, 13 insertions(+), 43 deletions(-)

diff --git a/java/org/apache/catalina/core/ApplicationContext.java 
b/java/org/apache/catalina/core/ApplicationContext.java
index 1f00282154..7561bb7172 100644
--- a/java/org/apache/catalina/core/ApplicationContext.java
+++ b/java/org/apache/catalina/core/ApplicationContext.java
@@ -680,7 +680,6 @@ public class ApplicationContext implements ServletContext {
             } catch (Throwable t) {
                 ExceptionUtils.handleThrowable(t);
                 context.fireContainerEvent("afterContextAttributeRemoved", 
listener);
-                // FIXME - should we do anything besides log these?
                 log(sm.getString("applicationContext.attributeEvent"), t);
             }
         }
@@ -743,7 +742,6 @@ public class ApplicationContext implements ServletContext {
                 } else {
                     context.fireContainerEvent("afterContextAttributeAdded", 
listener);
                 }
-                // FIXME - should we do anything besides log these?
                 log(sm.getString("applicationContext.attributeEvent"), t);
             }
         }
diff --git a/java/org/apache/catalina/core/ApplicationFilterFactory.java 
b/java/org/apache/catalina/core/ApplicationFilterFactory.java
index ad723df92e..8bcd9390f5 100644
--- a/java/org/apache/catalina/core/ApplicationFilterFactory.java
+++ b/java/org/apache/catalina/core/ApplicationFilterFactory.java
@@ -23,7 +23,10 @@ import javax.servlet.ServletRequest;
 import org.apache.catalina.Globals;
 import org.apache.catalina.Wrapper;
 import org.apache.catalina.connector.Request;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.descriptor.web.FilterMap;
+import org.apache.tomcat.util.res.StringManager;
 
 /**
  * Factory for the creation and caching of Filters and creation of Filter 
Chains.
@@ -33,6 +36,9 @@ import org.apache.tomcat.util.descriptor.web.FilterMap;
  */
 public final class ApplicationFilterFactory {
 
+    private static final Log log = 
LogFactory.getLog(ApplicationFilterFactory.class);
+    private static final StringManager sm = 
StringManager.getManager(ApplicationFilterFactory.class);
+
     private ApplicationFilterFactory() {
         // Prevent instance creation. This is a utility class.
     }
@@ -107,7 +113,7 @@ public final class ApplicationFilterFactory {
             ApplicationFilterConfig filterConfig =
                     (ApplicationFilterConfig) 
context.findFilterConfig(filterMap.getFilterName());
             if (filterConfig == null) {
-                // FIXME - log configuration problem
+                
log.warn(sm.getString("applicationFilterFactory.noFilterConfig", 
filterMap.getFilterName()));
                 continue;
             }
             filterChain.addFilter(filterConfig);
@@ -124,7 +130,7 @@ public final class ApplicationFilterFactory {
             ApplicationFilterConfig filterConfig =
                     (ApplicationFilterConfig) 
context.findFilterConfig(filterMap.getFilterName());
             if (filterConfig == null) {
-                // FIXME - log configuration problem
+                
log.warn(sm.getString("applicationFilterFactory.noFilterConfig", 
filterMap.getFilterName()));
                 continue;
             }
             filterChain.addFilter(filterConfig);
diff --git a/java/org/apache/catalina/core/LocalStrings.properties 
b/java/org/apache/catalina/core/LocalStrings.properties
index 13c7c2dc30..eb54a58eb2 100644
--- a/java/org/apache/catalina/core/LocalStrings.properties
+++ b/java/org/apache/catalina/core/LocalStrings.properties
@@ -55,6 +55,8 @@ applicationFilterConfig.jmxUnregisterFail=JMX de-registration 
failed for filter
 applicationFilterConfig.preDestroy=Failed the call to preDestroy for the 
filter named [{0}] of type [{1}]
 applicationFilterConfig.release=Failed to destroy the filter named [{0}] of 
type [{1}]
 
+applicationFilterFactory.noFilterConfig=No filter configuration sound for [{0}]
+
 applicationFilterRegistration.nullInitParam=Unable to set initialisation 
parameter for filter due to null name and/or value. Name [{0}], Value [{1}]
 applicationFilterRegistration.nullInitParams=Unable to set initialisation 
parameters for filter due to null name and/or value. Name [{0}], Value [{1}]
 
diff --git a/java/org/apache/catalina/core/StandardContext.java 
b/java/org/apache/catalina/core/StandardContext.java
index da108e8f41..856ae99a47 100644
--- a/java/org/apache/catalina/core/StandardContext.java
+++ b/java/org/apache/catalina/core/StandardContext.java
@@ -5958,7 +5958,6 @@ public class StandardContext extends ContainerBase 
implements Context, Notificat
      */
     @Override
     public MBeanNotificationInfo[] getNotificationInfo() {
-        // FIXME: we not send j2ee.attribute.changed
         if (notificationInfo == null) {
             notificationInfo = new MBeanNotificationInfo[] {
                     new MBeanNotificationInfo(new String[] { 
"j2ee.object.created" }, Notification.class.getName(),
diff --git a/java/org/apache/catalina/core/StandardWrapper.java 
b/java/org/apache/catalina/core/StandardWrapper.java
index 36a5fc530b..d47079cfe6 100644
--- a/java/org/apache/catalina/core/StandardWrapper.java
+++ b/java/org/apache/catalina/core/StandardWrapper.java
@@ -1648,8 +1648,6 @@ public class StandardWrapper extends ContainerBase 
implements ServletConfig, Wra
      */
     @Override
     public MBeanNotificationInfo[] getNotificationInfo() {
-        // FIXME: we not send j2ee.state.failed
-        // FIXME: we not send j2ee.attribute.changed
         if (notificationInfo == null) {
             notificationInfo = new MBeanNotificationInfo[] {
                     new MBeanNotificationInfo(new String[] { 
"j2ee.object.created" }, Notification.class.getName(),
diff --git a/java/org/apache/catalina/mbeans/MBeanFactory.java 
b/java/org/apache/catalina/mbeans/MBeanFactory.java
index 5bc430ea61..34613d75ef 100644
--- a/java/org/apache/catalina/mbeans/MBeanFactory.java
+++ b/java/org/apache/catalina/mbeans/MBeanFactory.java
@@ -654,10 +654,7 @@ public class MBeanFactory {
         if (container instanceof Context) {
             ((Context) container).setLoader(loader);
         }
-        // FIXME add Loader.getObjectName
-        // ObjectName oname = loader.getObjectName();
-        ObjectName oname = MBeanUtils.createObjectName(pname.getDomain(), 
loader);
-        return oname.toString();
+        return loader.getObjectName().toString();
 
     }
 
diff --git a/java/org/apache/catalina/mbeans/MBeanUtils.java 
b/java/org/apache/catalina/mbeans/MBeanUtils.java
index 8914cb0b06..5097dad0ef 100644
--- a/java/org/apache/catalina/mbeans/MBeanUtils.java
+++ b/java/org/apache/catalina/mbeans/MBeanUtils.java
@@ -458,29 +458,6 @@ public class MBeanUtils {
     }
 
 
-    /**
-     * Create an <code>ObjectName</code> for this <code>Loader</code> object.
-     *
-     * @param domain Domain in which this name is to be created
-     * @param loader The Loader to be named
-     *
-     * @return a new object name
-     *
-     * @exception MalformedObjectNameException if a name cannot be created
-     */
-    static ObjectName createObjectName(String domain, Loader loader) throws 
MalformedObjectNameException {
-
-        ObjectName name = null;
-        Context context = loader.getContext();
-
-        ContextName cn = new ContextName(context.getName(), false);
-        Container host = context.getParent();
-        name = new ObjectName(domain + ":type=Loader,host=" + host.getName() + 
",context=" + cn.getDisplayName());
-
-        return name;
-    }
-
-
     /**
      * Create an <code>ObjectName</code> for this <code>Role</code> object.
      *
diff --git a/java/org/apache/catalina/session/StandardSession.java 
b/java/org/apache/catalina/session/StandardSession.java
index 5e0f051bca..feff609be5 100644
--- a/java/org/apache/catalina/session/StandardSession.java
+++ b/java/org/apache/catalina/session/StandardSession.java
@@ -744,7 +744,7 @@ public class StandardSession implements HttpSession, 
Session, Serializable {
             expiring = true;
 
             // Notify interested application event listeners
-            // FIXME - Assumes we call listeners in reverse order
+            // Call listeners in reverse order
             Context context = manager.getContext();
 
             // The call to expire() may not have been triggered by the webapp.
diff --git a/java/org/apache/catalina/startup/Bootstrap.java 
b/java/org/apache/catalina/startup/Bootstrap.java
index b31bdd1edf..0410db4e57 100644
--- a/java/org/apache/catalina/startup/Bootstrap.java
+++ b/java/org/apache/catalina/startup/Bootstrap.java
@@ -424,9 +424,6 @@ public final class Bootstrap {
      * Destroy the Catalina Daemon.
      */
     public void destroy() {
-
-        // FIXME
-
     }
 
 
diff --git a/java/org/apache/catalina/startup/ContextConfig.java 
b/java/org/apache/catalina/startup/ContextConfig.java
index 0a6e5fc4e3..0060a97871 100644
--- a/java/org/apache/catalina/startup/ContextConfig.java
+++ b/java/org/apache/catalina/startup/ContextConfig.java
@@ -2552,8 +2552,7 @@ public class ContextConfig implements LifecycleListener {
     }
 
     /**
-     * process filter annotation and merge with existing one! FIXME: 
refactoring method too long and has redundant
-     * subroutines with processAnnotationWebServlet!
+     * Process filter annotation and merge with existing one
      *
      * @param className The filter class name
      * @param ae        The filter annotation
diff --git a/java/org/apache/catalina/valves/JsonAccessLogValve.java 
b/java/org/apache/catalina/valves/JsonAccessLogValve.java
index d69f43156c..61ca3d00da 100644
--- a/java/org/apache/catalina/valves/JsonAccessLogValve.java
+++ b/java/org/apache/catalina/valves/JsonAccessLogValve.java
@@ -73,7 +73,6 @@ public class JsonAccessLogValve extends AccessLogValve {
 
     private static final Map<Character, String> PATTERNS;
     static {
-        // FIXME: finalize attribute names
         Map<Character, String> pattern2AttributeName = new HashMap<>();
         pattern2AttributeName.put(Character.valueOf('a'), "remoteAddr");
         pattern2AttributeName.put(Character.valueOf('A'), "localAddr");
@@ -102,7 +101,6 @@ public class JsonAccessLogValve extends AccessLogValve {
 
     private static final Map<Character, String> SUB_OBJECT_PATTERNS;
     static {
-        // FIXME: finalize attribute names
         Map<Character, String> pattern2AttributeName = new HashMap<>();
         pattern2AttributeName.put(Character.valueOf('c'), "cookies");
         pattern2AttributeName.put(Character.valueOf('i'), "requestHeaders");
diff --git a/java/org/apache/naming/NamingContext.java 
b/java/org/apache/naming/NamingContext.java
index 8f4a3510c8..2cae5f14d7 100644
--- a/java/org/apache/naming/NamingContext.java
+++ b/java/org/apache/naming/NamingContext.java
@@ -791,7 +791,6 @@ public class NamingContext implements Context {
         throws NamingException {
         throw  new OperationNotSupportedException
             (sm.getString("namingContext.noAbsoluteName"));
-        //FIXME ?
     }
 
 


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

Reply via email to