You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "elharo (via GitHub)" <gi...@apache.org> on 2026/09/10 13:44:06 UTC
[I] non-varargs call of varargs method with inexact argument type for last parameter in test code [maven-shared-utils]
elharo opened a new issue, #431:
URL: https://github.com/apache/maven-shared-utils/issues/431
### Affected version
HEAD
### Bug description
Should be straight-forward to clear these warnings
```
[WARNING] /Users/elharo/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/StringUtilsTest.java:[564,55] non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.String for a varargs call
cast to java.lang.String[] for a non-varargs call and to suppress this warning
[WARNING] /Users/elharo/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/StringUtilsTest.java:[566,58] non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.String for a varargs call
cast to java.lang.String[] for a non-varargs call and to suppress this warning
[WARNING] /Users/elharo/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/StringUtilsTest.java:[804,59] non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.String for a varargs call
cast to java.lang.String[] for a non-varargs call and to suppress this warning
[WARNING] /Users/elharo/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/StringUtilsTest.java:[806,62] non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.String for a varargs call
cast to java.lang.String[] for a non-varargs call and to suppress this warning
[WARNING] /Users/elharo/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/StringUtilsTest.java:[1373,41] non-varargs call of varargs method with inexact argument type for last parameter;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] non-varargs call of varargs method with inexact argument type for last parameter in test code [maven-shared-utils]
Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz commented on issue #431:
URL: https://github.com/apache/maven-shared-utils/issues/431#issuecomment-5631309612
Direction, for whoever picks this up: the seven warnings are all in `StringUtilsTest` and come from passing a `null` or a `String[]` typed as `Object` to a `String...` parameter. The fix is the cast the compiler suggests, `(String[]) null` where the test means "no varargs" and `(String) null` where it means one null element; pick whichever the assertion is actually testing, since the two are different calls. No change to `StringUtils` itself. `mvn -q test-compile` on master currently prints all seven, so the check is that it prints none.
@Luffy777-max, since you said you are on it: a PR against master is welcome; if nothing lands within a week we will pick it up.
*This comment was created with AI assistance.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] non-varargs call of varargs method with inexact argument type for last parameter in test code [maven-shared-utils]
Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz closed issue #431: non-varargs call of varargs method with inexact argument type for last parameter in test code
URL: https://github.com/apache/maven-shared-utils/issues/431
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] non-varargs call of varargs method with inexact argument type for last parameter in test code [maven-shared-utils]
Posted by "Luffy777-max (via GitHub)" <gi...@apache.org>.
Luffy777-max commented on issue #431:
URL: https://github.com/apache/maven-shared-utils/issues/431#issuecomment-5621449071
working on this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org