LeftCurly for Anonymous class

25 vistas
Ir al primer mensaje no leído

Vlad Rozov

no leída,
22 oct 2015, 11:41:56 a.m.22/10/15
para checkstyle
Hello,

Is there a way to enforce "{" on a new line for anonymous class definitions to be the same as CLASS_DEF? Even with 

<module name="LeftCurly">
  <property name="option" value="nl"/>
  <property name="tokens" value="ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_DEF, ENUM_CONSTANT_DEF, INTERFACE_DEF, METHOD_DEF"/>
</module>

the following code snippet is considered valid:

public void test()
{
  Thread t = new Thread(new Runnable() { // <== enforce { to be on a new line
  @Override
  public void run()
  {

  }
  });
}

Roman Ivanov

no leída,
24 oct 2015, 8:13:45 a.m.24/10/15
para checkstyle
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos