clang-format: [Java] Fix incorrect recognition of annonymous classes.

Before:
  someFunction(new Runnable() { public void run() { System.out.println(42);
  }
  });

After:
  someFunction(new Runnable() {
    public void run() {
      System.out.println(42);
    }
  });

llvm-svn: 225142
This commit is contained in:
Daniel Jasper
2015-01-04 20:40:51 +00:00
parent fd4ed18402
commit 5f1fa85e5b
2 changed files with 8 additions and 2 deletions

View File

@@ -387,6 +387,11 @@ TEST_F(FormatTestJava, FormatsInnerBlocks) {
" System.out.println(42);\n"
" }\n"
"}, someOtherParameter);");
verifyFormat("someFunction(new Runnable() {\n"
" public void run() {\n"
" System.out.println(42);\n"
" }\n"
"});");
verifyFormat("someObject.someFunction(\n"
" new Runnable() {\n"
" @Override\n"