Skip to content

Some callers of the StrngUtility::capitalize method lack the required null-checks #1940

@javifernandez

Description

@javifernandez

The StringUtility::capitalize() 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::capitalize() function:

app/src/common/shared/com/igalia/wolvic/ui/adapters/Language.java:        String displayName = StringUtils.capitalize(locale.getDisplayName());
app/src/common/shared/com/igalia/wolvic/ui/adapters/Language.java:        this.displayName = StringUtils.capitalize(displayName);
app/src/common/shared/com/igalia/wolvic/ui/widgets/KeyboardWidget.java:                items.add(new KeyboardSelectorView.Item(StringUtils.capitalize(keyboard.getKeyboardTitle()), keyboard));
app/src/common/shared/com/igalia/wolvic/utils/LocaleUtils.java:            return StringUtils.capitalize(locale.getDisplayLanguage(locale));
app/src/main/res/layout/bookmark_item_folder.xml:            android:text="@{StringUtils.capitalize(item.title)}"

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