undefect. CWE-407 — 63 sites patched across 27 ecosystems
Authors: russell@unturf.com · brackishbert@gmail.com · foxhop.net · TimeHexOn.com Patches, unit tests, benchmarks, whitepaper, and outreach briefs. Public domain — no copyright claimed. Use freely.
This commit is contained in:
commit
0a580b313d
70422 changed files with 17213626 additions and 0 deletions
37
test/langtools/tools/doclint/AnonClassTest.java
Normal file
37
test/langtools/tools/doclint/AnonClassTest.java
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-missing AnonClassTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref AnonClassTest.out AnonClassTest.java
|
||||
*/
|
||||
|
||||
/** Class comment. */
|
||||
public enum AnonClassTest {
|
||||
|
||||
/**
|
||||
* E1 comment.
|
||||
* This member uses an anonymous class, which should not trigger a warning.
|
||||
*/
|
||||
E1 {
|
||||
// no comment: should give warning
|
||||
int field;
|
||||
|
||||
// no comment: should give warning
|
||||
void m() { }
|
||||
|
||||
// no comment required: should not give warning
|
||||
@java.lang.Override
|
||||
public void m1() { }
|
||||
},
|
||||
|
||||
// This member also uses an anonymous class,
|
||||
// but there should only be a single warning for the member itself.
|
||||
E2 { },
|
||||
|
||||
/** E3 comment. This member does not use an anonymous class. */
|
||||
E3;
|
||||
|
||||
/** Method comment. */
|
||||
public void m1() { }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue