[formatter] keep final on the same line with annotation

This commit is contained in:
Yaroslav Lepenkin
2017-01-17 20:01:40 +03:00
parent fe7c5dcd8e
commit 4222bc2608
3 changed files with 11 additions and 3 deletions
@@ -652,4 +652,13 @@ public class JavaFormatterSpaceTest extends AbstractJavaFormatterTest {
"int x = (1 + 2 + 3) * (1 + 2 + 2) * (1 + 2);"
);
}
public void testKeepFinalOnLine() {
doClassTest(
"public static void bar(@NonNls final String[] args) {\n" +
"}",
"public static void bar(@NonNls final String[] args) {\n" +
"}");
}
}
@@ -3283,8 +3283,7 @@ public void testSCR260() throws Exception {
" list.clear();\n" +
" }\n" +
"};",
"@SuppressWarnings(\"unchecked\")\n" +
"final List<String> list = new ArrayList<String>();\n" +
"@SuppressWarnings(\"unchecked\") final List<String> list = new ArrayList<String>();\n" +
"new Runnable() {\n" +
" @Override\n" +
" public void run() {\n" +