mbien commented on code in PR #9632:
URL: https://github.com/apache/netbeans/pull/9632#discussion_r4082923860
##########
java/java.hints/src/org/netbeans/modules/java/hints/bugs/ArrayStringConversions.java:
##########
@@ -366,6 +367,119 @@ public static ErrorDescription
printlnPrintStream(HintContext ctx) {
}
return printPrintStream(ctx);
}
+
+ @TriggerPatterns({
+ @TriggerPattern(
+ value="java.lang.IO.print($v)",
+ constraints = {
+ @ConstraintVariableType(type = "java.lang.Object[]",
variable = "$v")
+ }
+ ),
Review Comment:
`char[]` rule is missing.
I suppose this was copied from the `System.out` version. The two utilities
are not completely symmetrical since `System.out.println()` has a `char[]`
variant, `IO` has only `Object`.
so there should be warning for IO but _not_ for System (when a char array is
passed):
<img width="315" height="71" alt="Image"
src="https://github.com/user-attachments/assets/4f2a7e66-2533-4c2e-baed-52e21225b019"
/>
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists