Severity | 1 |
---|---|
Enabled | yes |
Waivable | |
Violation |
public class EnsureEjbPostCreateRuleViolationTestCase implements EntityBean { private static org.apache.log4j.Logger logger = org.apache.log4j.Logger.getRootLogger(); private transient EntityContext objcContext; private Integer mProdSubmissionID = null; public void setEntityContext(final EntityContext objaContext) { this.objcContext = objaContext; } public void unsetEntityContext() { objcContext = null; } public void ejbActivate() { } public void ejbPassivate() { } public void ejbLoad() { } public void ejbStore() { } public void ejbRemove() { } public Integer ejbCreate() throws CreateException, RemoteException { this.mProdSubmissionID = new Integer(0); return this.mProdSubmissionID; } } |
Fix |
public class EnsureEjbPostCreateRuleFixTestCase implements EntityBean { private static org.apache.log4j.Logger logger =org.apache.log4j.Logger.getRootLogger(); private transient EntityContext objcContext; private Integer mProdSubmissionID = null; public void setEntityContext(final EntityContext objaContext) { this.objcContext = objaContext; } public void unsetEntityContext() { objcContext = null; } public void ejbActivate() { } public void ejbPassivate() { } public void ejbLoad() { } public void ejbStore() { } public void ejbRemove() { } public Integer ejbCreate() throws CreateException, RemoteException { this.mProdSubmissionID = new Integer(0); return this.mProdSubmissionID; } public void ejbPostCreate() { } } |