| Summary: | JavaConventions#validatePackageName(..) allows creation of package whose name begins with "java" | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Curtis Autery <ceautery> |
| Component: | Core | Assignee: | Ayushman Jain <amj87.iitr> |
| Status: | NEW --- | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | jarthana, markus.kell.r, remy.suen, yatsenko.ihor |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| See Also: |
https://git.eclipse.org/r/151490 https://git.eclipse.org/r/151503 |
||
| Whiteboard: | stalebug | ||
|
Description
Curtis Autery
I didn't find anything in the JLS that would disallow a package starting with "java.", and javac also happily compiles such classes. Only java.lang.ClassLoader#defineClass(..) says that a package name must not start with "java.".
Moving to JDT/Core. JavaConventions#validatePackageName(..) should return a warning for such package names. It should not be an error, since the construct is legal and can actually be used for testing purposes (if the classes are loaded via -Xbootclasspath).
package java.test;
public class C {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Ayush, please follow-up, thanks New Gerrit change created: https://git.eclipse.org/r/151490 New Gerrit change created: https://git.eclipse.org/r/151503 @Markus Keller can you please take a look my fix? (In reply to Ihor Yatsenko from comment #5) > @Markus Keller can you please take a look my fix? Markus is no longer with the team. I will keep this in the radar but no guarantee yet. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |