space between annotation and type is normalized (IDEA-172599)

This commit is contained in:
Yaroslav Lepenkin
2017-05-10 13:48:26 +03:00
parent 99b2073364
commit 05d70cee37
2 changed files with 14 additions and 1 deletions
@@ -1149,7 +1149,7 @@ public class JavaSpacePropertyProcessor extends JavaElementVisitor {
@Override
public void visitModifierList(PsiModifierList list) {
if (myType1 == JavaElementType.ANNOTATION && myType2 == JavaTokenType.FINAL_KEYWORD) {
myResult = Spacing.createSpacing(1, Integer.MAX_VALUE, 0, false, mySettings.KEEP_BLANK_LINES_IN_CODE);
myResult = Spacing.createSpacing(1, 1, 0, false, mySettings.KEEP_BLANK_LINES_IN_CODE);
}
else if (myType1 == JavaTokenType.END_OF_LINE_COMMENT) {
myResult = Spacing.createSpacing(0, Integer.MAX_VALUE, 1, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_CODE);
@@ -3364,5 +3364,18 @@ public void testSCR260() throws Exception {
" break;\n" +
"}");
}
public void testAnnotationAndFinalInsideParamList() {
doClassTest(
"public class Test {\n" +
" void test(@Nullable final String childFallbackProvider) {\n" +
" }\n" +
"}",
"public class Test {\n" +
" void test(@Nullable final String childFallbackProvider) {\n" +
" }\n" +
"}"
);
}
}