Stable snapshot for readers — taken under the same monitor as append(), so consumers can iterate without racing the WS thread.
()
| 36 | * so consumers can iterate without racing the WS thread. |
| 37 | */ |
| 38 | public synchronized List<Object> snapshot() { |
| 39 | return new ArrayList<>(this); |
| 40 | } |
| 41 | |
| 42 | @Override |
| 43 | public synchronized Object[] toArray() { |
no outgoing calls
no test coverage detected