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)
======================================================================
- duplicates
-
JDK-4306482 # Need improved diagnostics for misplaced source files and ill-formed classpath
-
- Closed
-