jdk-24/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsEnum.java
Jonathan Gibbons 0a58cffe88 8298405: Implement JEP 467: Markdown Documentation Comments
8329296: Update Elements for '///' documentation comments

Co-authored-by: Jim Laskey <jlaskey@openjdk.org>
Reviewed-by: prappo, darcy, hannesw
2024-05-17 17:42:46 +00:00

39 lines
1.0 KiB
Java

/*
* @test /nodynamiccopyright/
* @compile -Xlint:dangling-doc-comments DanglingDocCommentsEnum.java
* @compile/ref=empty.out -XDrawDiagnostics DanglingDocCommentsEnum.java
* @compile/ref=DanglingDocCommentsEnum.enabled.out -XDrawDiagnostics -Xlint:dangling-doc-comments DanglingDocCommentsEnum.java
*/
// This is a test of duplicate and misplaced doc comments in an enum class, using traditional comments
/** Bad/Extra Enum Comment. */
/** Good Enum Comment. */
@Deprecated
/** Misplaced: after anno. */
public /** Misplaced: after mods. */ enum DanglingDocCommentsEnum /** Misplaced: after ident */
{
/** Bad/Extra enum-member Comment. */
/**
* Good enum-member Comment.
*/
E1;
/** Bad/Extra Field Comment. */
/**
* Good Field Comment.
*/
public int i;
/** Bad/Extra Method Comment. */
/**
* Good Method Comment.
*/
public void m1() {
}
@SuppressWarnings("dangling-doc-comments")
/** Bad/misplaced/suppressed comment. */
public void m2() {
}
}