Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManoj Palat2015-04-07 06:23:14 +0000
committerManoj Palat2015-04-07 06:23:14 +0000
commit85c3910148a52bd90ba14ca10cb546d91552e129 (patch)
treed38b28dd6a818858c50aa455f87cde67469aa81f
parent43acf92f388300d5f01b9f356b08fd3725e374b7 (diff)
downloadeclipse.jdt.core-85c3910148a52bd90ba14ca10cb546d91552e129.tar.gz
eclipse.jdt.core-85c3910148a52bd90ba14ca10cb546d91552e129.tar.xz
eclipse.jdt.core-85c3910148a52bd90ba14ca10cb546d91552e129.zip
Test case patch for Bug 407629 [formatter]Formatting of a
Java source fails when the closing '}' of a Javadoc '@link' is missing in comment
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java56
1 files changed, 56 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java
index 68d68db1b2..729fc031e2 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java
@@ -10640,4 +10640,60 @@ public void testBug460008() throws Exception {
// K_COMPILATION_UNIT is tested by FormatterRegressionTests#test512() and #test643()
}
+public void testBug407629() throws Exception {
+ String source =
+ "public class X {\n" +
+ " /**\n" +
+ " * Builds a {@link Level}.\n" +
+ " * <p>\n" +
+ " * Does <b>not</b> set :\n" +
+ " * <ul>\n" +
+ " * <li>{@link Level#setA(Boolean)</li>\n" +
+ " * <li>{@link Level#setB(Long)}</li>\n" +
+ " * <li>{@link Level#setC(Integer)}</li>\n" +
+ " * </ul>\n" +
+ " * </p>\n" +
+ " */\n" +
+ " public static Level buildLevel() {\n" +
+ " return null;\n" +
+ " }\n" +
+ " \n" +
+ "}\n" +
+ "\n" +
+ "class Level {\n" +
+ " void setA(Boolean b) {}\n" +
+ " void setB(Long l) {}\n" +
+ " void setC(Integer i){}\n" +
+ "}\n";
+ String expected = "public class X {\n" +
+ " /**\n" +
+ " * Builds a {@link Level}.\n" +
+ " * <p>\n" +
+ " * Does <b>not</b> set :\n" +
+ " * <ul>\n" +
+ " * <li>{@link Level#setA(Boolean)</li>\n" +
+ " * <li>{@link Level#setB(Long)}</li>\n" +
+ " * <li>{@link Level#setC(Integer)}</li>\n" +
+ " * </ul>\n" +
+ " * </p>\n" +
+ " */\n" +
+ " public static Level buildLevel() {\n" +
+ " return null;\n" +
+ " }\n" +
+ "\n" +
+ "}\n" +
+ "\n" +
+ "class Level {\n" +
+ " void setA(Boolean b) {\n" +
+ " }\n" +
+ "\n" +
+ " void setB(Long l) {\n" +
+ " }\n" +
+ "\n" +
+ " void setC(Integer i) {\n" +
+ " }\n" +
+ "}\n";
+ formatSource(source, expected);
+}
+
}

Back to the top