#593 WhitespaceAround wrongly targets annotation element arrays

release_1.0
closed
Oliver Burn
5
2013-11-10
2009-10-07
Mark Hobson
No

WhitespaceAround fails on the following:

@MyAnnotation(myArrayElement = {"a", "b", "c"})

With: "'}' is not preceded with whitespace."

Whereas the same formatting used with array initialisation passes:

String myArrayElement = new String[] {"a", "b", "c"};

Discussion


  • Anonymous
    2009-11-27

    I too have run into this using checkstyle 5. Any target for this?

     
  • Florian Reiser
    Florian Reiser
    2013-04-09

    Any workaround for this bug available?

     
  • Paul Sprague
    Paul Sprague
    2013-04-25

    Removing RCURLY from the tokens property of WhitespaceAround works.

     
  • Roman Ivanov
    Roman Ivanov
    2013-11-10

    • status: open --> closed
    • Group: --> release_1.0