Bad Smell Code
1. 无用代码
``` java
public XrCadre findUpdate(String id) {
ServiceResult<String> ret = new ServiceResult<String>();
XrCadre xrCadre = xrCadreMapper.selectByPrimaryKey(id);
if (xrCadre != null) {
return xrCadre;
} else {
return null;
}
}
```
2. 方法名、参数名语义不明确
``` java
public List<XrCandidateFamily> findbyId(String id){
XrCandidateFamilyExample example = new XrCandidateFamilyExample();
example.createCriteria().andCandidateIdEqualTo(id);
return candidateFamilyMapper.selectByExample(example);
}
```
3. try catch finally
[http://git.oschina.net/yylce/JavaProjects/blob/master/Chapter12/src/reader/BufferedReaderDemo.java](http://git.oschina.net/yylce/JavaProjects/blob/master/Chapter12/src/reader/BufferedReaderDemo.java?_blank)