Skip to content

fix(test): fix varargs warnings in StringUtilsTest - #437

Merged
slachiewicz merged 2 commits into
apache:masterfrom
Luffy777-max:fix-issue-431-varargs-warnings
Sep 19, 2026
Merged

slachiewicz merged 2 commits into
apache:masterfrom
Luffy777-max:fix-issue-431-varargs-warnings

Conversation

@Luffy777-max

Copy link
Copy Markdown
Contributor

Fix compiler warnings about non-varargs calls to varargs methods with inexact argument types.

Changes:

Line 564, 566: Cast null to (String[]) in testIndexOfAny
Line 804, 806, 808, 810: Convert varargs to explicit String arrays in testLastIndexOfAny
Line 1373, 1377, 1379: Cast null to (String[]) and convert strings to String[] in testStripAll1

Fixes #431"

…ler warnings about non-varargs calls to varargs methods with inexact argument types. Changes: - Line 564, 566: Cast null to (String[]) in testIndexOfAny - Line 804, 806, 808, 810: Convert varargs to explicit String arrays in testLastIndexOfAny - Line 1373, 1377, 1379: Cast null to (String[]) and convert single strings to String[] in testStripAll1 Fixes apache#431

These changes fix compiler warnings:
[WARNING] non-varargs call of varargs method with inexact argument type for last parameter

The fixes ensure type safety by explicitly casting or wrapping arguments in String[] arrays.
@slachiewicz
slachiewicz merged commit 891953d into apache:master Sep 19, 2026
11 checks passed
@github-actions github-actions Bot added this to the 3.5.0 milestone Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

non-varargs call of varargs method with inexact argument type for last parameter in test code

2 participants