added check for FinderException throws clause to ejbSelect check

This commit is contained in:
Rick Giles 2003-06-30 23:49:37 +00:00
parent 772107d27c
commit d0fbb100b6
2 changed files with 6 additions and 0 deletions

View File

@ -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"});
}
}
}
}

View File

@ -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);
}