View Javadoc
1   /*
2   RightCurly
3   option = ALONE
4   tokens = (default)LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE
5   
6   
7   */
8   
9   package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;
10  
11  import java.util.stream.Collectors;
12  import java.util.stream.Stream;
13  
14  public class InputRightCurlyTestIsAloneLambda {
15  
16      static Runnable r1 = () -> {
17          String.valueOf("Test rightCurly one!");
18      };
19  
20      static Runnable r2 = () -> String.valueOf("Test rightCurly two!");
21  
22      static Runnable r3 = () -> {String.valueOf("Test rightCurly three!");};
23  
24      static Runnable r4 = () -> {
25          String.valueOf("Test rightCurly four!");};
26  
27      static Runnable r5 = () ->
28      {
29          String.valueOf("Test rightCurly five!");
30      };
31  
32      static Runnable r6 = () -> {};
33  
34      static Runnable r7 = () -> {
35      };
36  
37      static Runnable r8 = () ->
38      {
39      };
40  
41      static Runnable r9 = () -> {
42          String.valueOf("Test rightCurly nine!");
43      }; int i;
44  
45      void foo1() {
46          Stream.of("Hello").filter(s -> {
47                  return s != null;
48              }
49          ).collect(Collectors.toList());
50  
51          Stream.of("Hello").filter(s -> {
52                  return s != null;
53          }).collect(Collectors.toList());
54      }
55  }