Polishing
This commit is contained in:
@@ -41,7 +41,7 @@ abstract class ReadOnlySystemAttributesMap implements Map<String, String> {
|
||||
|
||||
@Override
|
||||
public boolean containsKey(Object key) {
|
||||
return get(key) != null;
|
||||
return (get(key) != null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -51,9 +51,7 @@ abstract class ReadOnlySystemAttributesMap implements Map<String, String> {
|
||||
@Override
|
||||
public String get(Object key) {
|
||||
Assert.isInstanceOf(String.class, key,
|
||||
String.format("expected key [%s] to be of type String, got %s",
|
||||
key, key.getClass().getName()));
|
||||
|
||||
String.format("expected key [%s] to be of type String, got %s", key, key.getClass().getName()));
|
||||
return this.getSystemAttribute((String) key);
|
||||
}
|
||||
|
||||
@@ -64,11 +62,11 @@ abstract class ReadOnlySystemAttributesMap implements Map<String, String> {
|
||||
|
||||
/**
|
||||
* Template method that returns the underlying system attribute.
|
||||
*
|
||||
* <p>Implementations typically call {@link System#getProperty(String)} or {@link System#getenv(String)} here.
|
||||
*/
|
||||
protected abstract String getSystemAttribute(String attributeName);
|
||||
|
||||
|
||||
// Unsupported
|
||||
|
||||
@Override
|
||||
@@ -102,7 +100,7 @@ abstract class ReadOnlySystemAttributesMap implements Map<String, String> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putAll(Map<? extends String, ? extends String> m) {
|
||||
public void putAll(Map<? extends String, ? extends String> map) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user