code: private FileHandlerResult processDir(final File dir) {
          // CHECKSTYLE:ON
  
          final FileHandlerResult dirResult = handler.handleFile(dir);
          if (dirResult == FileHandlerResult.STOP) {
              return FileHandlerResult.STOP;
          }
          if (dirResult == FileHandlerResult.SKIP_ALL) {
              return FileHandlerResult.CONTINUE;
          }
  
          final File[] files = dir.listFiles();
          if (files != null) {
              final List<File> sortedFiles = asList(files);
              for (int i = 0; i < sortedFiles.size(); i++) {
                  final File file = sortedFiles.get(i);
                  FileHandlerResult result = FileHandlerResult.CONTINUE;
                  if (file.isDirectory() && (dirResult != FileHandlerResult.SKIP_SUBDIRS)) {
                      result = processDir(file);
                  } else if (file.isFile() && (dirResult != FileHandlerResult.SKIP_FILES)) {
                      result = handler.handleFile(file);
                  }
                  if (result == FileHandlerResult.STOP) {
                      return FileHandlerResult.STOP;
                  }
                  if (result == FileHandlerResult.SKIP_ALL) {
                      return FileHandlerResult.CONTINUE;
                  }
              }
          }
  
          return FileHandlerResult.CONTINUE;
  
      }
docs: CHECKSTYLE:OFF Cyclomatic complexity of 11 is OK here