Skip to content

Commit

Permalink
[JENKINS-36871] When tiered compilation kicks in, sometimes you can g…
Browse files Browse the repository at this point in the history
…et concurrent modification exceptions

- They'll recover, but better is not to have to worry about it at all
  • Loading branch information
stephenc committed Aug 3, 2016
1 parent 0ef5cac commit adc6014
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/hudson/remoting/RemoteInvocationHandler.java
Expand Up @@ -750,8 +750,11 @@ private void cleanList(@CheckForNull List<PhantomReferenceImpl> referenceList) {
if (referenceList == null) {
return;
}
for (PhantomReferenceImpl phantom: referenceList) {
phantom.clear();
for (int i = 0; i < referenceList.size(); i++) {
PhantomReferenceImpl phantom = referenceList.get(i);
if (phantom != null) {
phantom.clear();
}
}
// simplify life for the Garbage collector by reducing reference counts
referenceList.clear();
Expand Down

0 comments on commit adc6014

Please sign in to comment.