void () { // Inspired by IDEA-42167 // Disabled because the contents of the {@code tag} is not necessarily Java code and // therefore it's incorrect to modify it when formatting getSettings().SPACE_AFTER_COMMA = false; String initial = """ public class FormattingTest { /** * This is a convenience method for {@code doTest(test, new Object[0]);} */ void doTest() { } }"""; // Expect single space to left between 'new' and Object[0]. doTextTest(initial, """ public class FormattingTest { /** * This is a convenience method for {@code doTest(test,new Object[0]);} */ void doTest() { } }"""); // Expect space to be inserted between ',' and 'new'. getSettings().SPACE_AFTER_COMMA = true; doTextTest(initial, """ public class FormattingTest { /** * This is a convenience method for {@code doTest(test, new Object[0]);} */ void doTest() { } }"""); // Expect space to be inserted between 'test' and ','. getSettings().SPACE_BEFORE_COMMA = true; doTextTest(initial, """ public class FormattingTest { /** * This is a convenience method for {@code doTest(test , new Object[0]);} */ void doTest() { } }"""); }