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

javac should restrict source file name if class used outside source file

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 6
    • tools
    • generic
    • solaris_8

      javac should implement the following (optional) JLS 7.6 constraint as a warning:

        When packages are stored in a file system (?7.2.1), the host system may choose to enforce the restriction that it is a compile-time error if a type is not found in a file under a name composed of the type name plus an extension (such as .java or .jav) if either of the following is true:

          * The type is referred to by code in other compilation units of the package in which the type is declared.
      ...

            jjg Jonathan Gibbons
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: