Skip to content

Some callers of the StrngUtility::removeRange method lack the required null-checks #1941

@javifernandez

Description

@javifernandez

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

app/src/common/shared/com/igalia/wolvic/ui/views/NavigationURLBar.java:                        mBinding.urlEditText.setText(StringUtils.removeRange(mBinding.urlEditText.getText().toString(), startSelection, endSelection));
app/src/common/shared/com/igalia/wolvic/ui/views/NavigationURLBar.java:                            mBinding.urlEditText.setText(StringUtils.removeRange(mBinding.urlEditText.getText().toString(), startSelection, endSelection));

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