【发布时间】:2020-02-15 09:27:52
【问题描述】:
我的代码中有以下语句违反了某些声纳规则。
LOG.info("Fetched: {}", mapper.writeValueAsString(requests));
这个为mapper.writeValueAsString(requests)显示Invoke method(s) only conditionally。
}catch (Exception e) {
LOG.error("Exception occurred while trying to fetch requests", e);
throw new GenericException(Error.FETCH_REQUEST_ERR_001.name(), e.getMessage(), Error.FETCH_REQUEST_ERR_001.value());
}
这个显示Either log this exception and handle it, or rethrow it with some contextual information.违反规则。
关于如何解决这些问题的任何想法。感谢任何帮助。
【问题讨论】:
标签: sonarqube