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

Warning for java files misplaced from their package dir

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.2
    • tools
    • generic
    • generic



      Name: skT88420 Date: 07/28/99


      During a project reorganization I moved a sourcefile from a package pgd to a package pgd.files.
      But I forgot to change the package statement at the top of the file to reflect it being moved.
      Meanwhile I also made changes.

      Then I recompiled and it compiled flawlessly.

      Needless to say I was surprised when something that neatly referenced pgd.files.MyClass
      didn't compile. Oops.
      It seems like a good idea to add to javac a warning for when a source
      file has a package statement and the last item of the package name does not match the
      directory immediately enclosing the source file.
      (Review ID: 93166)
      ======================================================================

            wmaddoxsunw William Maddox (Inactive)
            skonchad Sandeep Konchady
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: