3
我々持っている例外を除いて、以下のコードで中止しますスキャン:私たちはルールを見sonarqubeは6.3エラー-シンボリック実行-到達限界-の-16000でし-完了していないが、ステップ
org.sonar.java.se.ExplodedGraphWalker$MaximumStepsReachedException: reached limit of 16000 steps for method getServiceProviders#151 in class ServiceProviderService
S2259およびS2583を参照し、ヌルポインタに関する通知を保持したい。
これは「通常」モードとデバッグ(-X)モードの両方で発生するため、問題は1406ではありません。私たちの場合、実際にはtry/catchに関連しているようです。 (下記のサンプルメソッドを参照してください)問題1295の復活は可能でしょうか? https://jira.sonarsource.com/browse/SONARJAVA-1295もしそうなら、私たちは一緒に移動できるように、スタックを16,000から単純に増やす方法がありますか?
SAMPLE方法:
public static List<ServiceProvider> getServiceProviders() throws DAOException {
Connection con = null;
PreparedStatement stmt = null;
ResultSet rs = null;
List<ServiceProvider> serviceProviderList = new ArrayList<>();
try {
con = DatabaseUtils.getConnection();
if (con != null) {
stmt = con.prepareStatement(sqlSelectServiceProviders);
rs = stmt.executeQuery();
while (rs.next()) {
ServiceProvider serviceProvider = new ServiceProvider();
serviceProvider.setId(rs.getLong(1));
serviceProvider.setName(rs.getString(2));
// etc.
serviceProviderList.add(serviceProvider);
}
} else {
DAOException ourDAOException = new DAOException();
ourDAOException.setMessageCode(Consts.ERROR_CANNOT_ESTABLISH_CONNECTIONS);
throw ourDAOException;
}
} catch (DAOException daoexcep) {
throw daoexcep;
} catch (Exception sqlex) {
log.error(ErrorType.SYSTEM + ": " + Consts.ERROR_CANNOT_GET_SERVICE_PROVIDER + " - " + sqlex);
log.error(sqlex);
try {
if (con != null) {
con.rollback();
}
} catch (SQLException ex) {
}
DAOException ourDAOException = new DAOException(sqlex);
ourDAOException.setMessageCode(Consts.ERROR_CANNOT_GET_SERVICE_PROVIDER);
throw ourDAOException;
} finally {
if (con != null) {
try {
con.close();
} catch (SQLException e) {
}
con = null;
}
}
return serviceProviderList;
}