@Test void testConfigurationNotFoundException() { assertThrows(ConfigurationNotFoundException.class, () -> this.loader.load(this.classLoader, "does.not.exists.config")); }
public @Nonnull Properties load(ClassLoader loader, String configurationName) { try (InputStream resourceAsStream = loader .getResourceAsStream("META-INF/" + configurationName + ".properties")) { if (resourceAsStream == null) { throw new ConfigurationNotFoundException("the configuration " + configurationName + " could not be found with the ClassLoader " + loader); } Properties properties = new Properties(); properties.load(resourceAsStream); return properties; } catch (IOException e) { throw new IllegalStateException(e); } }
InternalDefaultConfigurationLoader { public @Nonnull Properties load(ClassLoader loader, String configurationName) { try (InputStream resourceAsStream = loader .getResourceAsStream("META-INF/" + configurationName + ".properties")) { if (resourceAsStream == null) { throw new ConfigurationNotFoundException("the configuration " + configurationName + " could not be found with the ClassLoader " + loader); } Properties properties = new Properties(); properties.load(resourceAsStream); return properties; } catch (IOException e) { throw new IllegalStateException(e); } } }
InternalDefaultConfigurationLoader { public @Nonnull Properties load(ClassLoader loader, String configurationName) { try (InputStream resourceAsStream = loader .getResourceAsStream("META-INF/" + configurationName + ".properties")) { if (resourceAsStream == null) { throw new ConfigurationNotFoundException("the configuration " + configurationName + " could not be found with the ClassLoader " + loader); } Properties properties = new Properties(); properties.load(resourceAsStream); return properties; } catch (IOException e) { throw new IllegalStateException(e); } }  }
InternalDefaultConfigurationLoader { public @Nonnull Properties load(ClassLoader loader, String configurationName) { try (InputStream resourceAsStream = loader .getResourceAsStream("META-INF/" + configurationName + ".properties")) { if (resourceAsStream == null) { throw new ConfigurationNotFoundException("the configuration " + configurationName + " could not be found with the ClassLoader " + loader); } Properties properties = new Properties(); properties.load(resourceAsStream); return properties; } catch (IOException e) { throw new IllegalStateException(e); } }  @Nonnull Properties load(ClassLoader loader, String configurationName); }
InternalDefaultConfigurationLoader { public @Nonnull Properties load(ClassLoader loader, String configurationName) { try (InputStream resourceAsStream = loader .getResourceAsStream("META-INF/" + configurationName + ".properties")) { if (resourceAsStream == null) { throw new ConfigurationNotFoundException("the configuration " + configurationName + " could not be found with the ClassLoader " + loader); } Properties properties = new Properties(); properties.load(resourceAsStream); return properties; } catch (IOException e) { throw new IllegalStateException(e); } }  @Nonnull Properties load(ClassLoader loader, String configurationName);  }