mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-02 11:05: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() {
|
||||
return new AbstractSet<Entry<String, String>>() {
|
||||
// Cache size, if requested, -1 means not calculated
|
||||
private int mSize = -1;
|
||||
private int size = -1;
|
||||
|
||||
public Iterator<Entry<String, String>> iterator() {
|
||||
return new Iterator<Entry<String, String>>() {
|
||||
// Iterator is backed by initParameterNames enumeration
|
||||
final Enumeration mNames = getInitParameterNames();
|
||||
final Enumeration names = getInitParameterNames();
|
||||
|
||||
public boolean hasNext() {
|
||||
return mNames.hasMoreElements();
|
||||
return names.hasMoreElements();
|
||||
}
|
||||
|
||||
public Entry<String, String> next() {
|
||||
final String key = (String) mNames.nextElement();
|
||||
final String key = (String) names.nextElement();
|
||||
return new Entry<String, String>() {
|
||||
public String getKey() {
|
||||
return key;
|
||||
@ -234,11 +234,11 @@ class ServletConfigMapAdapter extends AbstractMap<String, String> implements Map
|
||||
}
|
||||
|
||||
public int size() {
|
||||
if (mSize < 0) {
|
||||
mSize = calculateSize();
|
||||
if (size < 0) {
|
||||
size = calculateSize();
|
||||
}
|
||||
|
||||
return mSize;
|
||||
return size;
|
||||
}
|
||||
|
||||
private int calculateSize() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user