View Javadoc
1   /*
2   LeftCurly
3   option = NL
4   ignoreEnums = (default)true
5   tokens = (default)ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_CONSTANT_DEF, \
6            ENUM_DEF, INTERFACE_DEF, LAMBDA, LITERAL_CASE, LITERAL_CATCH, \
7            LITERAL_DEFAULT, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, \
8            LITERAL_IF, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, \
9            METHOD_DEF, OBJBLOCK, STATIC_INIT, RECORD_DEF, COMPACT_CTOR_DEF
10  
11  
12  */
13  
14  package com.puppycrawl.tools.checkstyle.checks.blocks.leftcurly;
15  
16  public class InputLeftCurlyTestNewLineOptionWithLambda
17  {
18      static Runnable r1 = () -> { // violation ''{' at column 32 should be on a new line'
19          String.valueOf("Hello world one!");
20      };
21  
22      static Runnable r2 = () -> String.valueOf("Hello world two!");
23      // violation below ''{' at column 32 should be on a new line'
24      static Runnable r3 = () -> {String.valueOf("ok");};
25  
26      static Runnable r4 = () ->
27      {
28          String.valueOf("Hello world one!");
29      };
30  }