8208371: Provided supported mechanims to create a ModuleElement for an unnamed module
authordarcy
Fri, 11 Jan 2019 09:57:15 -0800
changeset 53259 754312b616de
parent 53258 e348b0160d61
child 53260 fbc921683f02
8208371: Provided supported mechanims to create a ModuleElement for an unnamed module Reviewed-by: jjg
src/java.compiler/share/classes/javax/lang/model/util/Elements.java
test/langtools/tools/javac/processing/model/element/TestModuleElementNames.java
--- a/src/java.compiler/share/classes/javax/lang/model/util/Elements.java	Fri Jan 11 08:20:25 2019 -0800
+++ b/src/java.compiler/share/classes/javax/lang/model/util/Elements.java	Fri Jan 11 09:57:15 2019 -0800
@@ -189,7 +189,7 @@
     /**
      * Returns a module element given its fully qualified name.
      *
-     * If the named module cannot be found, {@code null} is
+     * If the requested module cannot be found, {@code null} is
      * returned. One situation where a module cannot be found is if
      * the environment does not include modules, such as an annotation
      * processing environment configured for a {@linkplain
@@ -199,7 +199,7 @@
      * @implSpec The default implementation of this method returns
      * {@code null}.
      *
-     * @param name  the name
+     * @param name  the name, or an empty string for an unnamed module
      * @return the named module element, or {@code null} if it cannot be found
      * @see #getAllModuleElements
      * @since 9
--- a/test/langtools/tools/javac/processing/model/element/TestModuleElementNames.java	Fri Jan 11 08:20:25 2019 -0800
+++ b/test/langtools/tools/javac/processing/model/element/TestModuleElementNames.java	Fri Jan 11 09:57:15 2019 -0800
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8163989
+ * @bug 8163989 8208371
  * @summary Test basic workings of naming methods on ModuleElement
  * @library /tools/javac/lib
  * @modules java.compiler