8158456: ModuleDescriptor.read does not verify dependence on java.base in module-info.class

8159248: ModuleFinder.of not clear that FindException thrown if module descriptor cannot be derived for automatic module

Reviewed-by: chegar, mchung
This commit is contained in:
Alan Bateman 2016-06-17 08:41:39 +01:00
parent 0b83896bd2
commit 8547893efe
7 changed files with 338 additions and 133 deletions

View file

@ -42,6 +42,7 @@ import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import sun.security.action.GetPropertyAction;
/**
@ -267,6 +268,13 @@ public interface ModuleFinder {
*
* </ul>
*
* <p> If a {@code ModuleDescriptor} cannot be created (by means of the
* {@link ModuleDescriptor.Builder ModuleDescriptor.Builder} API) for an
* automatic module then {@code FindException} is thrown. This can arise,
* for example, when a legal Java identifier name cannot be derived from
* the file name of the JAR file or where a package name derived from an
* entry ending with {@code .class} is not a legal Java identifier. </p>
*
* <p> In addition to JAR files, an implementation may also support modules
* that are packaged in other implementation specific module formats. When
* a file is encountered that is not recognized as a packaged module then