Message-Beans with no Valid Constructor |
The aim of this query is to point out violations of the following rule: a message-bean class must define a public constructor that takes no arguments.
Pre-packaged Query
Query name="Semmle/StyleChecks/J2EE/Message-Bean/A message-bean class must define a public constructor that takes no arguments"
Reports all Message-Bean types that do not contain a public constructor that takes no arguments.
from MessageBean mbean
where not exists(Constructor c | c.getDeclaringType() = mbean and c.hasModifier("public") and c.hasNoParams())
select mbean, mbean.toString() + " message-bean class must define"
+ " a public constructor that takes no arguments"
References
Enterprise JavaBeans 2.1 - Specification, section 15.7.2
|