[GitHub] [tomcat] markt-asf commented on a change in pull request #227: Unit test FileStore utility methods

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [tomcat] markt-asf commented on a change in pull request #227: Unit test FileStore utility methods

GitBox
markt-asf commented on a change in pull request #227: Unit test FileStore utility methods
URL: https://github.com/apache/tomcat/pull/227#discussion_r352784340
 
 

 ##########
 File path: java/org/apache/catalina/session/FileStore.java
 ##########
 @@ -136,8 +136,8 @@ public int getSize() throws IOException {
         // Figure out which files are sessions
         int keycount = 0;
         if (files != null) {
-            for (int i = 0; i < files.length; i++) {
-                if (files[i].endsWith(FILE_EXT)) {
+            for (String file1 : files) {
+                if (file1.endsWith (FILE_EXT)) {
                     keycount++;
 
 Review comment:
   `file1` looks odd here. I'd change the `file` above to `dir` and use `file` here for consistency with other for loops.

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]