Oracle's chief Java architect has proposed tweaks to Java's modular plan. The revisions were said to be not in response to recent objections by Red Hat and IBM, but they do appear to address one of the concerns.
In a post to an openjdk mailing list on Thursday, a proposal by Oracle's Mark Reinhold, chief architect of the Java platform group, centers on an "AutomaticModuleNames" feature. He also referenced the plan on his twitter feed, tweeting, "Module names should be reverse-DNS and so automatic modules can be given stable names." An Oracle representative said the proposal was just ongoing work on issues that continue to be under discussion and was separate from Red Hat and IBM's issues.
Summarizing the issue in Thursday's proposal, Reinhold mentioned revising the algorithm that computes the name of automatic modules to include the Maven group identifier when available in a JAR file's `pom.properties` file. This way, module names "are less likely to collide, or else drop the automatic-modules feature entirely, since it may be more trouble than it's worth." He then proposes not dropping the automatic modules feature, calling it a critical part of migration, aiding developers in modularizing code.
Reinhold suggests a JAR-file manifest attribute, `Automatic-Module-Name`, whose value is used as the name of the automatic module defined by that JAR file when placed on the module path. Reinhold also recommends that all modules be named according to the reverse Internet domain-name convention. He wants developers to be aware of risks of publishing, for broad use, explicit modules that require automatic modules. "An automatic module is unreliable, since it can depend on types on the class path and its name and exported packages could change if and when it's converted into an explicit module," Reinhold said. "It's fine to declare and use explicit modules that require automatic modules in limited settings."
Modularity is set to be the big feature of Java Development Kit (JDK) 9 due on July 27. But another Oracle official this week acknowledged that the complaints about modularity could actually delay the release of JDK 9, or, simply, Java 9.