View Javadoc
1   package com.google.checkstyle.test.chapter4formatting.rule451wheretobreak;
2   
3   import java.util.Arrays;
4   
5   /** Some javdoc. */
6   public class InputSeparatorWrapMethodRef {
7   
8     void goodCase() {
9       String[] stringArray = {
10        "Barbara", "James", "Mary", "John", "Patricia", "Robert", "Michael", "Linda"
11      };
12      Arrays.sort(stringArray, String::compareToIgnoreCase);
13    }
14  
15    void badCase() {
16      String[] stringArray = {
17        "Barbara", "James", "Mary", "John", "Patricia", "Robert", "Michael", "Linda"
18      };
19      Arrays.sort(
20          stringArray,
21          String:: // violation ''::' should be on a new line.'
22              compareToIgnoreCase);
23    }
24  }