Skip to content

Commit

Permalink
Merge pull request #2475 from akarnokd/SyncQueueCloneFix
Browse files Browse the repository at this point in the history
SynchronousQueue.clone fix
  • Loading branch information
akarnokd committed Jan 21, 2015
2 parents 2af4f74 + 67e8cfe commit b359bb9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/rx/internal/util/SynchronizedQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ public synchronized boolean offer(T e) {

@Override
public synchronized Object clone() {
return list.clone();
SynchronizedQueue<T> q = new SynchronizedQueue<T>(size);
q.addAll(list);
return q;
}

@Override
Expand Down

0 comments on commit b359bb9

Please sign in to comment.