Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 519560

Summary: [9][api] Add JavaConventions#validateModuleName(..)
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Jay Arthanareeswaran <jarthana>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, noopur_gupta
Version: 4.7   
Target Milestone: BETA J9   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/102226
https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=4bb584ab101ffde46bbadd02e100bfc3001951c3
Whiteboard:
Bug Depends on:    
Bug Blocks: 519254    

Description Markus Keller CLA 2017-07-12 10:45:31 EDT
Add an API
org.eclipse.jdt.core.JavaConventions#validateModuleName(String, String, String) with an implementation very similar to validatePackageName(..) and one additional  rule (based on JLS9 2017-06-26 6.1 p.142): The first component of a module name must not be 'java'. Although the message says 'must', the severity should still be WARNING, because it should still be possible for a developer working on Java SE itself to create a java.* module.
Comment 1 Jay Arthanareeswaran CLA 2017-07-26 06:03:03 EDT
Another additional warning that Javac is issuing is about terminal digits. For example, both the following examples for module name get a warning:

mod1.one
mod.one1

I will add these rule as well to the WARNING list.
Comment 2 Eclipse Genie CLA 2017-07-31 07:09:04 EDT
New Gerrit change created: https://git.eclipse.org/r/102226