@Test public void testSingleCharacterNull() { assertThat(envPropertySource.get("a")).isNull(); }
@Override public PropertyValue get(String key) { if (isDisabled()) { return null; } String effectiveKey = hasPrefix() ? getPrefix() + "." + key : key; String value = getPropertiesProvider().getenv(effectiveKey); if(value==null){ effectiveKey = effectiveKey.replaceAll("\\W", "_"); value = getPropertiesProvider().getenv(effectiveKey); } if(value==null){ effectiveKey = effectiveKey.toUpperCase(); value = getPropertiesProvider().getenv(effectiveKey); } if(value==null){ return null; } return PropertyValue.createValue(key, value).setMeta("source", getName()); }
EnvironmentPropertySource extends BasePropertySource { @Override public PropertyValue get(String key) { if (isDisabled()) { return null; } String effectiveKey = hasPrefix() ? getPrefix() + "." + key : key; String value = getPropertiesProvider().getenv(effectiveKey); if(value==null){ effectiveKey = effectiveKey.replaceAll("\\W", "_"); value = getPropertiesProvider().getenv(effectiveKey); } if(value==null){ effectiveKey = effectiveKey.toUpperCase(); value = getPropertiesProvider().getenv(effectiveKey); } if(value==null){ return null; } return PropertyValue.createValue(key, value).setMeta("source", getName()); } }
EnvironmentPropertySource extends BasePropertySource { @Override public PropertyValue get(String key) { if (isDisabled()) { return null; } String effectiveKey = hasPrefix() ? getPrefix() + "." + key : key; String value = getPropertiesProvider().getenv(effectiveKey); if(value==null){ effectiveKey = effectiveKey.replaceAll("\\W", "_"); value = getPropertiesProvider().getenv(effectiveKey); } if(value==null){ effectiveKey = effectiveKey.toUpperCase(); value = getPropertiesProvider().getenv(effectiveKey); } if(value==null){ return null; } return PropertyValue.createValue(key, value).setMeta("source", getName()); } EnvironmentPropertySource();  EnvironmentPropertySource(int ordinal);  EnvironmentPropertySource(String prefix, int ordinal);  EnvironmentPropertySource(String prefix); }
EnvironmentPropertySource extends BasePropertySource { @Override public PropertyValue get(String key) { if (isDisabled()) { return null; } String effectiveKey = hasPrefix() ? getPrefix() + "." + key : key; String value = getPropertiesProvider().getenv(effectiveKey); if(value==null){ effectiveKey = effectiveKey.replaceAll("\\W", "_"); value = getPropertiesProvider().getenv(effectiveKey); } if(value==null){ effectiveKey = effectiveKey.toUpperCase(); value = getPropertiesProvider().getenv(effectiveKey); } if(value==null){ return null; } return PropertyValue.createValue(key, value).setMeta("source", getName()); } EnvironmentPropertySource();  EnvironmentPropertySource(int ordinal);  EnvironmentPropertySource(String prefix, int ordinal);  EnvironmentPropertySource(String prefix); @Override int getDefaultOrdinal(); @Override String getName(); @Override PropertyValue get(String key); @Override Map<String, PropertyValue> getProperties(); String getPrefix(); boolean isDisabled(); @Override ChangeSupport getChangeSupport(); }
EnvironmentPropertySource extends BasePropertySource { @Override public PropertyValue get(String key) { if (isDisabled()) { return null; } String effectiveKey = hasPrefix() ? getPrefix() + "." + key : key; String value = getPropertiesProvider().getenv(effectiveKey); if(value==null){ effectiveKey = effectiveKey.replaceAll("\\W", "_"); value = getPropertiesProvider().getenv(effectiveKey); } if(value==null){ effectiveKey = effectiveKey.toUpperCase(); value = getPropertiesProvider().getenv(effectiveKey); } if(value==null){ return null; } return PropertyValue.createValue(key, value).setMeta("source", getName()); } EnvironmentPropertySource();  EnvironmentPropertySource(int ordinal);  EnvironmentPropertySource(String prefix, int ordinal);  EnvironmentPropertySource(String prefix); @Override int getDefaultOrdinal(); @Override String getName(); @Override PropertyValue get(String key); @Override Map<String, PropertyValue> getProperties(); String getPrefix(); boolean isDisabled(); @Override ChangeSupport getChangeSupport(); static final int DEFAULT_ORDINAL; }