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

-Xlint:auxiliaryclass

    XMLWordPrintable

Details

    • b64
    • generic
    • generic
    • Verified

    Description

      Although legal, the use of multiple top level classes in the same file is somewhat questionable to begin with, but it is particularly bad when in some package class A in A.java refers to class B defined in C.java. This requires that at times the files must be compiled together, and prevents implicit compilation from locating such "hidden classes".

      It would be a fine thing for javac to provide an optional warning to detect such references.

      One suggestion is to add a new suboption to -Xlint, namely -Xlint:auxiliaryclass.

      Attachments

        Issue Links

          Activity

            People

              ohrstrom Fredrik Öhrström
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: