View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="RegexpSinglelineJava"/>
5     </module>
6   </module>
7   */
8   package com.puppycrawl.tools.checkstyle.checks.regexp.regexpsinglelinejava;
9   
10  import java.io.FileReader;
11  import java.io.FileWriter;
12  import java.io.IOException;
13  import java.util.logging.Logger;
14  
15  // xdoc section -- start
16  class Example1 {
17  
18    private void testMethod1() {
19      int debug = 0;
20      System.out.println("");
21      System.out.
22      println("");
23    }
24  
25    private void testMethod2() throws IOException {
26      FileReader in = new FileReader("path/to/input");
27      int ch = in.read();
28      while(ch != -1) {
29        System.out.print((char)ch);
30        ch = in.read();
31      }
32  
33      FileWriter out = new FileWriter("path/to/output");
34      out.write("something");
35    }
36  
37    public void testMethod3(){
38      final Logger logger = Logger.getLogger(Example1.class.getName());
39      logger.info("first");
40      logger.info("second");
41      logger.info("third");
42      System.out.println("fourth");
43      logger.info("fifth");
44    }
45  }
46  // xdoc section -- end