Tag: sonarqube 5.0

Sonar抱怨记录并重新抛出exception

我在我的程序中有以下代码,我在运行SonarQube 5后,将它与Maven集成后进行代码质量检查。 然而,Sonar抱怨我应该记录或重新抛出此exception 。 我在这里想念的是什么? 我还没有记录exception吗? private boolean authenticate(User user) { boolean validUser = false; int validUserCount = 0; try { DataSource dataSource = (DataSource) getServletContext().getAttribute(“dataSource”); validUserCount = new MasterDao(dataSource).getValidUserCount(user); } catch (SQLException sqle) { LOG.error(“Exception while validating user credentials for user with username: ” + user.getUsername() + ” and pwd:” + user.getPwd()); LOG.error(sqle.getMessage()); } […]