You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if RAIR.displayCapabilities == null, the SCM will create WindowCapablity that is not null but all fields inside it will be null. Previously, we used to assume that everything is enabled when displayCapabilities is null. However, after the change and because WindowCapablity is always not null, the case is not true in all places in ScreenManager.
int getNumberOfLines() {
if (defaultMainWindowCapability == null){
return 4;
}
int linesFound = 0;
List<TextField> textFields = defaultMainWindowCapability.getTextFields();
TextFieldName name;
if (textFields != null && !textFields.isEmpty()) {
for (TextField field : textFields) {
if (field.getName() != null) {
name = field.getName();
if (name == TextFieldName.mainField1 || name == TextFieldName.mainField2 || name == TextFieldName.mainField3 || name == TextFieldName.mainField4) {
linesFound += 1;
}
}
}
}
return linesFound;
}
Like in prev example, it's textFields are null, the function will return 0 even though it should return 4.
We have to go over all cases and clearly define what null means for capabilities. And pay special attention to NPEs.
The text was updated successfully, but these errors were encountered:
Bug Report
Currently, if RAIR.displayCapabilities == null, the SCM will create WindowCapablity that is not null but all fields inside it will be null. Previously, we used to assume that everything is enabled when displayCapabilities is null. However, after the change and because WindowCapablity is always not null, the case is not true in all places in ScreenManager.
Like in prev example, it's textFields are null, the function will return 0 even though it should return 4.
We have to go over all cases and clearly define what null means for capabilities. And pay special attention to NPEs.
The text was updated successfully, but these errors were encountered: