Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MONDRIAN-2628] Possible race condition in PartiallyOrderedSet #1156

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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