Java Code Examples for java.lang.module.Configuration#empty()

The following examples show how to use java.lang.module.Configuration#empty() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConfigurationTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Test the empty configuration.
 */
public void testEmptyConfiguration() {
    Configuration cf = Configuration.empty();

    assertTrue(cf.parents().isEmpty());

    assertTrue(cf.modules().isEmpty());
    assertFalse(cf.findModule("java.base").isPresent());
}
 
Example 2
Source File: ConfigurationTest.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = { NullPointerException.class })
public void testResolveRequiresWithNull3() {
    Configuration empty = Configuration.empty();
    Configuration.resolve(null, List.of(empty),  ModuleFinder.of(), Set.of());
}
 
Example 3
Source File: ConfigurationTest.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = { NullPointerException.class })
public void testResolveRequiresAndUsesWithNull3() {
    Configuration empty = Configuration.empty();
    Configuration.resolveAndBind(null, List.of(empty), ModuleFinder.of(), Set.of());
}