void () { // Inspired by IDEA-31681 getSettings().SPACE_AFTER_COMMA = false; getSettings().SPACE_AFTER_COMMA_IN_TYPE_ARGUMENTS = false; String initial = """ interface TestInterface<A,B> { <X,Y> void foo(X x,Y y); } public class FormattingTest implements TestInterface<String,Integer> { public <X,Y> void foo(X x,Y y) { Map<String,Integer> map = new HashMap<String,Integer>(); } }"""; doTextTest(initial, initial); // Don't expect the comma to be inserted getSettings().SPACE_AFTER_COMMA_IN_TYPE_ARGUMENTS = true; String formatted = """ interface TestInterface<A,B> { <X,Y> void foo(X x,Y y); } public class FormattingTest implements TestInterface<String, Integer> { public <X,Y> void foo(X x,Y y) { Map<String, Integer> map = new HashMap<String, Integer>(); } }"""; doTextTest(initial, formatted); // Expect the comma to be inserted between type arguments }