ECJ: Class names not verified for package-scope? [message #894789] |
Tue, 10 July 2012 14:26 |
Chris S Messages: 20 Registered: November 2011 |
Junior Member |
|
|
Hi,
I've run into something that to me looks like a bug, but may be intended, so before I make a bug report, I'd like to ask if this is as it should.
If I create a new class in Eclipse, e.g. "public ClassA", it will (of course) put it in a file called ClassA.java, and when I try to change the name of the class to ClassB manually (not using refactoring), I get an error because the file name and the class name do not match.
But, if I remove "public" so I have a package-internal class, then suddenly this verification doesn't happen. "protected" has the same behavior as "public". So it looks like this may be intentional. But if so, it is seriously annoying, we just had to spend a lot of time tracking down a strange behavior which turned out to be caused by someone changing a class name without changing the file name. I'd really like to have the compiler react to this for all top-level classes.
Anyone knows if this is intentional, or should I file a bug report?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03471 seconds