kinow commented on a change in pull request #64: Two small tweaks.
URL: https://github.com/apache/commons-io/pull/64#discussion_r341030615
 
 

 ##########
 File path: src/main/java/org/apache/commons/io/FilenameUtils.java
 ##########
 @@ -1385,11 +1386,11 @@ public static boolean wildcardMatch(final String 
fileName, final String wildcard
         boolean anyChars = false;
         int textIdx = 0;
         int wcsIdx = 0;
-        final Stack<int[]> backtrack = new Stack<>();
+        final Deque<int[]> backtrack = new ArrayDeque<>(wcs.length);
 
 Review comment:
   Looks reasonable to me. `Stack` is synchronized I think, while `Deque` is 
not. But `backtrack` is used in this method without any locks, so `Stack` 
doesn't appear to be used specifically for that. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to