title: Expecting EOF found if
body: <p>Hi I am stuck in the below problem where I got a checkstyle exception in <code>if(files !=null)</code>. So it is also not compilable.</p>
  
  <p><a href="https://i.stack.imgur.com/GfwkK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GfwkK.png" alt=""></a></p>
  
  <p>Here is my code : </p>
  
  <pre><code>private void printBeforeData(final int svrID, final PrintStream ps, final File dir) throws RemoteException {
  
      // 「p[サーバID].csv」は、メモリ上のデータを使用して生成するので、除く
      final String regexField = ELECTRIC_FILE + svrID + "\\.csv\\.[0-9]+$";
      final File[] files =  dir.listFiles((final File dirToFilter, final String filename) -&gt;
          filename.matches(regexField));
      if (files != null) {
          // 昇順でソート
          final List&lt;File&gt; listFiles1 = Arrays.asList(files);
          Collections.sort(listFiles1, (f1, f2)
                  -&gt; ElectricPowerManager.getSuffixNo(f1) - ElectricPowerManager.getSuffixNo(f2));
          final StringBuilder strings = new StringBuilder();
          for (final File file: listFiles1) {
              try (BufferedReader br = Files.newBufferedReader(file.toPath())) {
                  int cnt = 0;
                  for (String line = br.readLine(); line != null; line = br.readLine()) {
                      strings.append(line);
                      strings.append(LINE_BREAK);
                      cnt++;
                      if (cnt == CASH_ROW) {
                          // 一定数溜め込んでからファイル出力
                          ps.print(strings.toString());
                          strings.delete(0, strings.length());
                          cnt = 0;
                      }
                  }
                  if (cnt &gt; 0) {
                      ps.print(strings.toString());
                      strings.delete(0, strings.length());
                  }
              } catch (final IOException e) {
                  core.putSystemLog(this.getClass().getSimpleName() + "#" + METHOD_PRINT_BEFORE_DATA +
                          " Failed print Electric Data. serverID:" + svrID, e);
              }
          }
      }
  }
  </code></pre>