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

anchor already defined error seen for members with case-equivalent names

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • 9
    • tools

      tidy warning: anchor already defined

      Above tidy warning seen when the class name and a method name have same name and differ in uppercase/lowercase.

      Sample test case:
      import java.io.*;
      public class Baz {
          /**
           * Baz doc.
           *
           * @throws EOFException
           */
          public void baz() throws IOException {
          }
      }

      javadoc generates a constructor anchor as: <a name="Baz--">
      and a method anchor as: <a name="baz--">

      tidy reports error for such cases.
      Based on discussion with dev, anchors names generated for constructor will have to be prefixed with some text to differentiate such cases.

      UPDATE: As suggested by Jon, above tidy error is also seen for cases when a class has equivalent methods like abc() and ABC(), so looks like the error is not related to anchor names for constructors.

            Unassigned Unassigned
            sogoel Sonali Goel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: