Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8224083

javadoc Reporter generates warning for Kind.NOTE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 13
    • Fix Version/s: 13
    • Component/s: tools
    • Labels:
      None

      Backports

        Description

        My code clearly says to generate notes, but javadoc generates warnings.

                        reporter.print(Diagnostic.Kind.NOTE, e, msg);

        src/demo/MyDoclet.java:15: warning - > CLASS demo.MyDoclet
        src/demo/MyDoclet.java:74: warning - > > CLASS demo.MyDoclet.MyScanner
        src/demo/MyDoclet.java:74: warning - > > > CONSTRUCTOR MyScanner()
        src/demo/MyDoclet.java:75: warning - > > > METHOD scan(javax.lang.model.element.Element,java.lang.Integer)
        src/demo/MyDoclet.java:76: warning - > > > > PARAMETER e
        src/demo/MyDoclet.java:76: warning - > > > > PARAMETER depth

        This is borne out by the code in Messager. Either the default should be changed or an explicit case added for Kind.NOTE.


            @Override
            public void print(Kind kind, Element e, String msg) {
                        switch (kind) {
                    case ERROR:
                        printError(e, msg);
                        return;
                    case WARNING:
                    case MANDATORY_WARNING:
                        printWarning(e, msg);
                        return;
                    default:
                        printWarning(e, msg); <<<<<<<<<<<<<<<<<<<<<<
                        return;
                }
            }

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                vromero Vicente Arturo Romero Zaldivar
                Reporter:
                jjg Jonathan Gibbons
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: