ivanzlenko commented on code in PR #6357:
URL: https://github.com/apache/ignite-3/pull/6357#discussion_r2269729140


##########
modules/cli/src/main/java/org/apache/ignite/internal/cli/core/repl/completer/DynamicCompletionInsider.java:
##########
@@ -36,16 +36,13 @@ public DynamicCompletionInsider() {
 
     private static String[] trim(String[] typedWords) {
         List<String> trimmedWords = new ArrayList<>(typedWords.length);
-        int offset = 0;
         for (String typedWord : typedWords) {
             String currentTrim = typedWord.trim();
-            if (currentTrim.isEmpty()) {
-                offset++;
-            } else {
+            if (!currentTrim.isEmpty()) {

Review Comment:
   Correct way to initialize arrays for toArray method in modern is to pass 0 
as length of an array. offset variable is completely redundant here.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to