IDEMPIERE-5901 - Fix NPE for not found autocomplete column message (#2082)

This commit is contained in:
Marcos Gabriel de Oliveira Favaretto 2023-11-07 05:10:44 -03:00 committed by GitHub
parent 56d12a43cf
commit cc3ecd11ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 4 deletions

View File

@ -669,10 +669,17 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
}
}else {
// => don't run test in case not found auto complete column
if(!Util.isEmpty(autoCompleteSearchColumn))
log.log(Level.SEVERE, String.format("Auto complete search column (%s) not found for field %s (field id %s). ",
autoCompleteSearchColumn, m_gridfield.getColumnName(), m_gridfield.getAD_Column_ID()));
else if (identifiers.size() == 0)
if(!Util.isEmpty(autoCompleteSearchColumn)) {
if (m_gridfield != null) {
log.log(Level.SEVERE, String.format("Auto complete search column (%s) not found for field %s (field id %s). ",
autoCompleteSearchColumn, m_gridfield.getColumnName(), m_gridfield.getAD_Column_ID()));
} else {
log.log(Level.SEVERE, String.format("Auto complete search column (%s) not found for Info Window %s. ",
autoCompleteSearchColumn, this.infoWindow.getName()));
}
} else if (identifiers.size() == 0)
log.log(Level.SEVERE, String.format("Info window (%s) has no identifier columns", this.infoWindow.getName()));
}
}