View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="NoWhitespaceBefore">
5         <property name="tokens" value="METHOD_REF, DOT"/>
6       </module>
7     </module>
8   </module>
9   
10  
11  */
12  
13  package com.puppycrawl.tools.checkstyle.checks.whitespace.nowhitespacebefore;
14  
15  import com.google.common.collect.Lists;
16  
17  // xdoc section -- start
18  class Example3 {
19    void example() {
20      Lists.charactersOf("foo").listIterator()
21           .forEachRemaining(System.out::print);
22      // violation above ''.' is preceded with whitespace'
23      Lists.charactersOf("foo").listIterator().forEachRemaining(System.out ::print);
24      // violation above ''::' is preceded with whitespace'
25      Lists.charactersOf("foo").listIterator().forEachRemaining(System.out::print);
26    }
27  }
28  // xdoc section -- end