From 5ad47c58a32b5bb1f69f69ac489ddcc06feffd97 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Fri, 11 Jan 2019 09:57:15 -0800 Subject: [PATCH] 8208371: Provided supported mechanims to create a ModuleElement for an unnamed module Reviewed-by: jjg --- .../share/classes/javax/lang/model/util/Elements.java | 4 ++-- .../processing/model/element/TestModuleElementNames.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/java.compiler/share/classes/javax/lang/model/util/Elements.java b/src/java.compiler/share/classes/javax/lang/model/util/Elements.java index cef2b8d1f6e..042b1c22b8a 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/Elements.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/Elements.java @@ -189,7 +189,7 @@ public interface Elements { /** * 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 @@ public interface Elements { * @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 diff --git a/test/langtools/tools/javac/processing/model/element/TestModuleElementNames.java b/test/langtools/tools/javac/processing/model/element/TestModuleElementNames.java index 9449b61be0c..46fe2dcbb67 100644 --- a/test/langtools/tools/javac/processing/model/element/TestModuleElementNames.java +++ b/test/langtools/tools/javac/processing/model/element/TestModuleElementNames.java @@ -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