IDEA-64725 Race Condition when editing field annotations results in incorrect line wrapping

1. Corrected annotation wrap calculation in case of incomplete fields;
2. Corresponding test is added;
This commit is contained in:
Denis Zhdanov
2011-02-07 16:52:21 +03:00
parent fab080c7f5
commit 226df6d6df
2 changed files with 27 additions and 2 deletions
@@ -256,4 +256,14 @@ public class JavaFormatterWrapTest extends AbstractJavaFormatterTest {
"int j = 2;"
);
}
public void testIncompleteFieldAndAnnotationWrap() throws Exception {
// Inspired by IDEA-64725
getSettings().FIELD_ANNOTATION_WRAP = CommonCodeStyleSettings.DO_NOT_WRAP;
doClassTest(
"@NotNull Comparable<String>",
"@NotNull Comparable<String>"
);
}
}