Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-1693

ConcurrentModificationException when iterating over Host.getDeployments()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.0.0.Alpha3
    • 8.0.0.Alpha2
    • Web (Undertow)
    • None

    Description

      Though I understand the reasoning behind using Collections.unmodifiableSet() for the deployments returned from Host.getDeployments(), as its backed by the underlying Set this can still be a problem.

      In making GateIn work on Wildfly, I found that on occasion when iterating over Host.getDeployments() during container startup, I would encounter a ConcurrentModificationException if a new Deployment was added at the same point I was looping through the existing deployments by calling Iterator.next()

      It would be great if the Collection returned from Host.getDeployments() could be a copy of the underlying collection to prevent possible ConcurrentModificationExceptions.

      Attachments

        Activity

          People

            tomazcerar Tomaž Cerar (Inactive)
            kfinniga@redhat.com Ken Finnigan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: