Author: remy.maucherat(a)jboss.com
Date: 2012-06-27 11:29:53 -0400 (Wed, 27 Jun 2012)
New Revision: 2044
Modified:
trunk/java/org/apache/catalina/core/StandardContext.java
trunk/java/org/apache/catalina/session/StandardSession.java
Log:
- Port minor listeners optimizations.
Modified: trunk/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardContext.java 2012-06-18 11:43:11 UTC (rev
2043)
+++ trunk/java/org/apache/catalina/core/StandardContext.java 2012-06-27 15:29:53 UTC (rev
2044)
@@ -3375,7 +3375,7 @@
getLogger().debug("Sending application start events");
Object instances[] = getApplicationLifecycleListeners();
- if (instances == null)
+ if (instances == null || instances.length == 0)
return (ok);
ServletContextEvent event =
new ServletContextEvent(getServletContext());
Modified: trunk/java/org/apache/catalina/session/StandardSession.java
===================================================================
--- trunk/java/org/apache/catalina/session/StandardSession.java 2012-06-18 11:43:11 UTC
(rev 2043)
+++ trunk/java/org/apache/catalina/session/StandardSession.java 2012-06-27 15:29:53 UTC
(rev 2044)
@@ -361,7 +361,7 @@
// Notify interested application event listeners
Context context = (Context) manager.getContainer();
Object listeners[] = context.getApplicationSessionLifecycleListeners();
- if (listeners != null) {
+ if (listeners != null && listeners.length > 0) {
HttpSessionEvent event =
new HttpSessionEvent(getSession());
for (int i = 0; i < listeners.length; i++) {
Show replies by date