mebigfatguy / fb-contrib

a FindBugs/SpotBugs plugin for doing static code analysis for java code bases
http://fb-contrib.sf.net
GNU Lesser General Public License v2.1
157 stars 45 forks source link

with a @Transactional annotation and custom Exception, no report a bug #441

Open tonglei100 opened 1 year ago

tonglei100 commented 1 year ago

rule key:fb-contrib:JPAI_NON_SPECIFIED_TRANSACTION_EXCEPTION_HANDLING

this code is not report a bug, with custom Exception:NoMsgException, BizException

@Transactional
public void  orderSubmit(String userCode,List<CbOrderRsVO> waitingCallNextStepList) throws NoMsgException, BizException {...}

this code will report a bug, with Exception

@Transactional
public void  orderSubmit(String userCode,List<CbOrderRsVO> waitingCallNextStepList) throws Exception {...}
mebigfatguy commented 3 weeks ago

I'm assuming NoMsgException, BizException are RuntimeExceptions, which aren't reported.