-
Bug
-
Resolution: Fixed
-
P4
-
7
-
b68
-
x86
-
windows_7
-
Not verified
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
The field "entrySetView" in java.util.TreeMap$NavigableSubMap is initialized to null. It is never updated to non-null value.
The method entrySet() in AscendingSubMap and DescendingSubMap look like this:
public Set<Map.Entry<K,V>> entrySet() {
EntrySetView es = entrySetView;
return (es != null) ? es : new AscendingEntrySetView();
}
public Set<Map.Entry<K,V>> entrySet() {
EntrySetView es = entrySetView;
return (es != null) ? es : new DescendingEntrySetView();
}
Is this an intention or should it be the following:
public Set<Map.Entry<K,V>> entrySet() {
EntrySetView es = entrySetView;
return (es != null) ? es : (entrySetView = new AscendingEntrySetView());
}
public Set<Map.Entry<K,V>> entrySet() {
EntrySetView es = entrySetView;
return (es != null) ? es : (entrySetView = new DescendingEntrySetView());
}
REPRODUCIBILITY :
This bug can be reproduced always.
A DESCRIPTION OF THE PROBLEM :
The field "entrySetView" in java.util.TreeMap$NavigableSubMap is initialized to null. It is never updated to non-null value.
The method entrySet() in AscendingSubMap and DescendingSubMap look like this:
public Set<Map.Entry<K,V>> entrySet() {
EntrySetView es = entrySetView;
return (es != null) ? es : new AscendingEntrySetView();
}
public Set<Map.Entry<K,V>> entrySet() {
EntrySetView es = entrySetView;
return (es != null) ? es : new DescendingEntrySetView();
}
Is this an intention or should it be the following:
public Set<Map.Entry<K,V>> entrySet() {
EntrySetView es = entrySetView;
return (es != null) ? es : (entrySetView = new AscendingEntrySetView());
}
public Set<Map.Entry<K,V>> entrySet() {
EntrySetView es = entrySetView;
return (es != null) ? es : (entrySetView = new DescendingEntrySetView());
}
REPRODUCIBILITY :
This bug can be reproduced always.
- relates to
-
JDK-8007889 Fix for JDK-7175464 causes failure in TCK derived test
-
- Closed
-