-
Bug
-
Resolution: Done
-
Major
-
JBossAS-3.2.7 Final, JBossAS-4.0.1 Final, JBossAS-4.0.1 SP1
-
None
The checking of javax.jms.MessageListener.onMessage(javax.jms.Message) is not correct.
1) It only applies to that interface
2) It shoud only check for methods of that extact name/signature
The current code is wrong in at least the following ways:
1) It is checking any "onMessage" methods regardless of interface/signature
Iterator it = getOnMessageMethods(bean);
Method onMessage = (Method)it.next();
if (!isPublic(onMessage))
{ fireSpecViolationEvent(mdBean, onMessage, new Section("15.7.4.b")); status = false; }if ( (isFinal(onMessage)) || (isStatic(onMessage)) )
{ fireSpecViolationEvent(mdBean, onMessage, new Section("15.7.4.c")); status = false; }etc.
2) The method of testing for onMessage is not correct:
/**
- Check if the given message is the onMessage() method
*/
public boolean isOnMessageMethod( Method m ) { return (m.getName().startsWith("onMessage")); }