<div dir="ltr">I already filed a bug (ID 9063182), but was advised to write to this list instead.<div><br></div><div>I don't have an artificial test case, but it should be straightforward to write one.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 2 Jan 2020 at 18:01, Sean Mullan <<a href="mailto:sean.mullan@oracle.com">sean.mullan@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 1/1/20 1:25 PM, Roman Leventov wrote:<br>
> If somebody tries to iterate these collections concurrently with <br>
> modification in another thread, the consequences are undefined.<br>
<br>
Right, the javadoc is not clear on that.<br>
<br>
> A possible fix is to use CopyOnWriteArrayList as SecureSet.elements <br>
> field instead of LinkedList.<br>
<br>
A workaround is to synchronize on the returned collections when iterating.<br>
<br>
Would you please consider filing a bug [1]? If you have a test case, <br>
please also attach it to the bug report.<br>
<br>
Thanks,<br>
Sean<br>
<br>
[1] <a href="https://bugreport.java.com/bugreport/" rel="noreferrer" target="_blank">https://bugreport.java.com/bugreport/</a><br>
<br>
<br>
</blockquote></div>