@Test(expected = NullPointerException.class) public void getDoesNotAcceptNull() { DefaultConfiguration c = new DefaultConfiguration(new MockedConfigurationContext()); c.get((String)null); }
@Override public String get(String key) { Objects.requireNonNull(key, "Key must not be null."); PropertyValue value = configEvaluator.evaluateRawValue(key, configurationContext); if(value==null || value.getValue()==null){ return null; } value = PropertyFiltering.applyFilter(value, configurationContext); if(value!=null){ return value.getValue(); } return null; }
DefaultConfiguration implements Configuration, Serializable { @Override public String get(String key) { Objects.requireNonNull(key, "Key must not be null."); PropertyValue value = configEvaluator.evaluateRawValue(key, configurationContext); if(value==null || value.getValue()==null){ return null; } value = PropertyFiltering.applyFilter(value, configurationContext); if(value!=null){ return value.getValue(); } return null; } }
DefaultConfiguration implements Configuration, Serializable { @Override public String get(String key) { Objects.requireNonNull(key, "Key must not be null."); PropertyValue value = configEvaluator.evaluateRawValue(key, configurationContext); if(value==null || value.getValue()==null){ return null; } value = PropertyFiltering.applyFilter(value, configurationContext); if(value!=null){ return value.getValue(); } return null; } DefaultConfiguration(ConfigurationContext configurationContext); }
DefaultConfiguration implements Configuration, Serializable { @Override public String get(String key) { Objects.requireNonNull(key, "Key must not be null."); PropertyValue value = configEvaluator.evaluateRawValue(key, configurationContext); if(value==null || value.getValue()==null){ return null; } value = PropertyFiltering.applyFilter(value, configurationContext); if(value!=null){ return value.getValue(); } return null; } DefaultConfiguration(ConfigurationContext configurationContext); @Override String get(String key); List<PropertyValue> getValues(String key); @Override String getOrDefault(String key, String defaultValue); @Override T getOrDefault(String key, Class<T> type, T defaultValue); @Override Map<String, String> getProperties(); @Override T get(String key, Class<T> type); @Override T get(String key, TypeLiteral<T> type); @Override T getOrDefault(String key, TypeLiteral<T> type, T defaultValue); @Override Configuration with(ConfigOperator operator); @Override T query(ConfigQuery<T> query); @Override ConfigurationContext getContext(); @Override ConfigurationSnapshot getSnapshot(Iterable<String> keys); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
DefaultConfiguration implements Configuration, Serializable { @Override public String get(String key) { Objects.requireNonNull(key, "Key must not be null."); PropertyValue value = configEvaluator.evaluateRawValue(key, configurationContext); if(value==null || value.getValue()==null){ return null; } value = PropertyFiltering.applyFilter(value, configurationContext); if(value!=null){ return value.getValue(); } return null; } DefaultConfiguration(ConfigurationContext configurationContext); @Override String get(String key); List<PropertyValue> getValues(String key); @Override String getOrDefault(String key, String defaultValue); @Override T getOrDefault(String key, Class<T> type, T defaultValue); @Override Map<String, String> getProperties(); @Override T get(String key, Class<T> type); @Override T get(String key, TypeLiteral<T> type); @Override T getOrDefault(String key, TypeLiteral<T> type, T defaultValue); @Override Configuration with(ConfigOperator operator); @Override T query(ConfigQuery<T> query); @Override ConfigurationContext getContext(); @Override ConfigurationSnapshot getSnapshot(Iterable<String> keys); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }