mbien commented on code in PR #4537:
URL: https://github.com/apache/netbeans/pull/4537#discussion_r956491162


##########
contrib/groovy.grails/test/unit/src/org/netbeans/modules/groovy/grails/api/GrailsRuntimeTest.java:
##########
@@ -106,7 +106,7 @@ public void testCommandDescriptor() throws IOException {
         desc.getProps().setProperty("wrong", "wrong");
         assertEquals(props, desc.getProps());
 
-        String[] correctArgs = args.clone();
+        String[] correctArgs = new ArrayList<String>.toArray(args);

Review Comment:
   this doesn't compile since the `()` is missing. But what worse is that this 
is wrong. It would create an empty AL and copy `null` into the first element of 
`args` to mark the end of the (empty) array.
   
   please use `Arrays.copyOf(args, args.length)` for example. Same applies to 
the other occurrences.



-- 
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

Reply via email to