added check for FinderException throws clause to ejbSelect check
This commit is contained in:
parent
772107d27c
commit
d0fbb100b6
|
|
@ -52,6 +52,11 @@ public class EntityBeanEjbSelectCheck
|
|||
log(nameAST.getLineNo(), nameAST.getColumnNo(),
|
||||
"nonabstract.bean", "Method " + name);
|
||||
}
|
||||
if (!Utils.hasThrows(aAST, "javax.ejb.FinderException")) {
|
||||
log(nameAST.getLineNo(), nameAST.getColumnNo(),
|
||||
"missingthrows.bean",
|
||||
new Object[] {name, "javax.ejb.FinderException"});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ public class EntityBeanEjbSelectCheckTest extends BaseCheckTestCase
|
|||
"110:33: Method ejbSelectSomething must be public.",
|
||||
"110:33: Method ejbSelectSomething must not have modifier final.",
|
||||
"110:33: Method ejbSelectSomething must not have modifier static.",
|
||||
"110:33: Method ejbSelectSomething must throw javax.ejb.FinderException.",
|
||||
};
|
||||
verify(checkConfig, getPath("InputEntityBean.java"), expected);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue