7175464: entrySetView field is never updated in NavigableSubMap
The method entrySet() in AscendingSubMap and DescendingSubMap failed to cache the entrySetView. Reviewed-by: alanb, psandoz
This commit is contained in:
parent
79727a83aa
commit
1cf41521cc
@ -1759,7 +1759,7 @@ public class TreeMap<K,V>
|
|||||||
|
|
||||||
public Set<Map.Entry<K,V>> entrySet() {
|
public Set<Map.Entry<K,V>> entrySet() {
|
||||||
EntrySetView es = entrySetView;
|
EntrySetView es = entrySetView;
|
||||||
return (es != null) ? es : new AscendingEntrySetView();
|
return (es != null) ? es : (entrySetView = new AscendingEntrySetView());
|
||||||
}
|
}
|
||||||
|
|
||||||
TreeMap.Entry<K,V> subLowest() { return absLowest(); }
|
TreeMap.Entry<K,V> subLowest() { return absLowest(); }
|
||||||
@ -1840,7 +1840,7 @@ public class TreeMap<K,V>
|
|||||||
|
|
||||||
public Set<Map.Entry<K,V>> entrySet() {
|
public Set<Map.Entry<K,V>> entrySet() {
|
||||||
EntrySetView es = entrySetView;
|
EntrySetView es = entrySetView;
|
||||||
return (es != null) ? es : new DescendingEntrySetView();
|
return (es != null) ? es : (entrySetView = new DescendingEntrySetView());
|
||||||
}
|
}
|
||||||
|
|
||||||
TreeMap.Entry<K,V> subLowest() { return absHighest(); }
|
TreeMap.Entry<K,V> subLowest() { return absHighest(); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user