mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-02 19:15:29 -04:00
New code style, no functional changes.
This commit is contained in:
parent
3f98534011
commit
b5b1b4f422
@ -173,19 +173,19 @@ class ServletConfigMapAdapter extends AbstractMap<String, String> implements Map
|
|||||||
private Set<Entry<String, String>> createEntrySet() {
|
private Set<Entry<String, String>> createEntrySet() {
|
||||||
return new AbstractSet<Entry<String, String>>() {
|
return new AbstractSet<Entry<String, String>>() {
|
||||||
// Cache size, if requested, -1 means not calculated
|
// Cache size, if requested, -1 means not calculated
|
||||||
private int mSize = -1;
|
private int size = -1;
|
||||||
|
|
||||||
public Iterator<Entry<String, String>> iterator() {
|
public Iterator<Entry<String, String>> iterator() {
|
||||||
return new Iterator<Entry<String, String>>() {
|
return new Iterator<Entry<String, String>>() {
|
||||||
// Iterator is backed by initParameterNames enumeration
|
// Iterator is backed by initParameterNames enumeration
|
||||||
final Enumeration mNames = getInitParameterNames();
|
final Enumeration names = getInitParameterNames();
|
||||||
|
|
||||||
public boolean hasNext() {
|
public boolean hasNext() {
|
||||||
return mNames.hasMoreElements();
|
return names.hasMoreElements();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Entry<String, String> next() {
|
public Entry<String, String> next() {
|
||||||
final String key = (String) mNames.nextElement();
|
final String key = (String) names.nextElement();
|
||||||
return new Entry<String, String>() {
|
return new Entry<String, String>() {
|
||||||
public String getKey() {
|
public String getKey() {
|
||||||
return key;
|
return key;
|
||||||
@ -234,11 +234,11 @@ class ServletConfigMapAdapter extends AbstractMap<String, String> implements Map
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int size() {
|
public int size() {
|
||||||
if (mSize < 0) {
|
if (size < 0) {
|
||||||
mSize = calculateSize();
|
size = calculateSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
return mSize;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int calculateSize() {
|
private int calculateSize() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user