Skip to content

Some callers of the StrngUtility::removeSpaces method lack the required null-checks #1942

@javifernandez

Description

@javifernandez

The StringUtility::removeSpaces() method expect non-null arguments. This pre-condition should be honored by the callers. The @NonNull should detect some of these inconsistencies at compile time, bit it doesn't cover any case (eg, UI binding' s xml files).

These are some of the places where we are calling the StringUtility::removeSpaces() function:

app/src/common/shared/com/igalia/wolvic/ui/keyboards/ChinesePinyinKeyboard.java:            String codeWithoutSpaces = StringUtils.removeSpaces(newCode);
app/src/common/shared/com/igalia/wolvic/ui/keyboards/ChineseZhuyinKeyboard.java:            String codeWithoutSpaces = StringUtils.removeSpaces(result.words.get(0).code);
app/src/common/shared/com/igalia/wolvic/ui/widgets/KeyboardWidget.java:                displayComposingText(StringUtils.removeSpaces(mComposingDisplayText), ComposingAction.FINISH);
app/src/common/shared/com/igalia/wolvic/ui/widgets/KeyboardWidget.java:                if (selected.length() > 0 && StringUtils.removeSpaces(selected).contains(mComposingText)) {
app/src/common/shared/com/igalia/wolvic/ui/widgets/KeyboardWidget.java:            String code = StringUtils.removeSpaces(aItem.code);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions