Skip to content

Commit

Permalink
[MONDRIAN-2628] Possible race condition in PartiallyOrderedSet
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonardo Coelho committed Oct 8, 2019
1 parent 88efc17 commit d08ca9a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mondrian/src/main/java/mondrian/util/PartiallyOrderedSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* http://www.eclipse.org/legal/epl-v10.html.
* You must accept the terms of that agreement to use this software.
*
* Copyright (c) 2002-2017 Hitachi Vantara.. All rights reserved.
* Copyright (c) 2002-2019 Hitachi Vantara.. All rights reserved.
*/

package mondrian.util;
Expand Down Expand Up @@ -652,12 +652,12 @@ private List<E> descendants(E e, boolean up) {
final List<E> list = new ArrayList<E>();
while (!deque.isEmpty()) {
Node<E> node1 = deque.pop();
if(node1.e == null) {
// Node is top or bottom.
continue;
}
list.add(node1.e);
for (Node<E> child : up ? node1.childList : node1.parentList) {
if (child.e == null) {
// Node is top or bottom.
break;
}
if (seen.add(child)) {
deque.add(child);
}
Expand Down

0 comments on commit d08ca9a

Please sign in to comment.