diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java index de49705d7a6..b6e2948db78 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java @@ -7813,4 +7813,18 @@ public void testIssue2127b() { """, CodeFormatter.K_MODULE_INFO | CodeFormatter.F_INCLUDE_COMMENTS); } + +public void testBugGh3340() throws JavaModelException { + String source = "/**
a\n b
*/"; + formatSource(source, + "/**\n" + + " *
\n" +
+		" * a\n" +
+		" b\n" +
+		" * 
\n" + + " */", + CodeFormatter.K_JAVA_DOC + ); +} + }