dev@glassfish.java.net

minor deployment bug (WebListener) - diff attached

From: Wolfram Rittmeyer <w.rittmeyer_at_jsptutorial.org>
Date: Thu, 03 Sep 2009 16:31:17 +0200

Yesterday I realized, that my HttpSessionListener which is annotated
with @WebListener was rejected during deployment. I issued a bug report
this morning:

https://glassfish.dev.java.net/issues/show_bug.cgi?id=9357

Digging around I realized that the cause was just a pair of missing
round brackets. See the attached diff.

If it's okay I would commit this minor change.


--
Wolfram Rittmeyer


Index: deployment/dol/src/main/java/com/sun/enterprise/deployment/annotation/handlers/WebListenerHandler.java
===================================================================
--- deployment/dol/src/main/java/com/sun/enterprise/deployment/annotation/handlers/WebListenerHandler.java (Revision 31093)
+++ deployment/dol/src/main/java/com/sun/enterprise/deployment/annotation/handlers/WebListenerHandler.java (Arbeitskopie)
@@ -93,12 +93,12 @@
             throws AnnotationProcessorException {
 
         Class listenerClass = (Class)ainfo.getAnnotatedElement();
- if (!ServletContextListener.class.isAssignableFrom(listenerClass) ||
+ if (!(ServletContextListener.class.isAssignableFrom(listenerClass) ||
                 ServletContextAttributeListener.class.isAssignableFrom(listenerClass) ||
                 ServletRequestListener.class.isAssignableFrom(listenerClass) ||
                 ServletRequestAttributeListener.class.isAssignableFrom(listenerClass) ||
                 HttpSessionListener.class.isAssignableFrom(listenerClass) ||
- HttpSessionAttributeListener.class.isAssignableFrom(listenerClass)) {
+ HttpSessionAttributeListener.class.isAssignableFrom(listenerClass))) {
             log(Level.SEVERE, ainfo,
                 localStrings.getLocalString(
                 "enterprise.deployment.annotation.handlers.needtoimpllistenerinterface",