Hello everyone,
I was expecting SonarQube to detect a potential NullPointerException issue during the analysis, specifically in the getOperacionItemID() method. However, this issue was not flagged. I also tried using annotations like @NonNull in the method, but it didn’t work.
Version: 10.6.0-community
Implementation: Docker
Project: java 11
OperacionItemVO
public Long getOperacionItemID() {
return (Long) getValorAtributo("OperacionItemID");
}
OperacionItemProductoVO (extends OperacionItemVO)
ISqlWhere where = new SqlWhere();
if (tipoRol == WorkflowCTE.TIPO_ROL_ORIGEN) {
where.addCondition(
new SqlTerm(new SqlField(BSTables.TABLA_OPERACIONITEMCANCELACION,
"OperacionItemIDOrigen", "OperacionItemIDOrigen"), SqlConstants.IGUAL,
this.getOperacionItemID().toString(), Types.INTEGER, true),
SqlConstants.AND);
}else{
where.addCondition(
new SqlTerm(new SqlField(BSTables.TABLA_OPERACIONITEMCANCELACION,
"OperacionItemIDDestino", "OperacionItemIDDestino"), SqlConstants.IGUAL,
this.getOperacionItemID().toString(), Types.INTEGER, true),
SqlConstants.AND);
}
Could this be a configuration issue, or is there something specific about the code that prevents SonarQube from detecting it?
Thank you, Rafael