Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39520

CustomOrganizationFolderDescriptor breaks when multiple branch sources are added

    XMLWordPrintable

Details

    Description

      If you install one branch source (such as github-branch-source; plus workflow-multibranch), then later dynamically install a second one (such as cloudbees-bitbucket-branch-source), you get an error:

      ... hudson.ExtensionList fireOnChangeListeners
      SEVERE: Error firing ExtensionListListener.onChange().
      java.lang.UnsupportedOperationException
      	at hudson.util.Iterators$5.remove(Iterators.java:299)
      	at hudson.util.AdaptedIterator.remove(AdaptedIterator.java:60)
      	at java.util.AbstractCollection.removeAll(AbstractCollection.java:376)
      	at jenkins.branch.CustomOrganizationFolderDescriptor.doAddSpecificDescriptors(CustomOrganizationFolderDescriptor.java:153)
      	at jenkins.branch.CustomOrganizationFolderDescriptor.access$100(CustomOrganizationFolderDescriptor.java:53)
      	at jenkins.branch.CustomOrganizationFolderDescriptor$ListenerImpl.onChange(CustomOrganizationFolderDescriptor.java:138)
      	at ...
      

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick added a comment -

            Apparently ExtensionList supports remove but not removeAll.

            jglick Jesse Glick added a comment - Apparently ExtensionList supports remove but not removeAll .

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/jenkins/branch/CustomOrganizationFolderDescriptor.java
            src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java
            http://jenkins-ci.org/commit/branch-api-plugin/b95b07f52d3d4e5191cf6109b770cc2010026b20
            Log:
            [FIXED JENKINS-39520] ExtensionList.removeAll is unimplemented.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/jenkins/branch/CustomOrganizationFolderDescriptor.java src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java http://jenkins-ci.org/commit/branch-api-plugin/b95b07f52d3d4e5191cf6109b770cc2010026b20 Log: [FIXED JENKINS-39520] ExtensionList.removeAll is unimplemented.

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/jenkins/branch/CustomOrganizationFolderDescriptor.java
            src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java
            http://jenkins-ci.org/commit/branch-api-plugin/1f75509b9f033532fc852e4937d59cd42b1ab732
            Log:
            Merge pull request #56 from jglick/UnsupportedOperationException-JENKINS-39520

            JENKINS-39520 ExtensionList.removeAll is unimplemented
            (cherry picked from commit f5c8342f2fd73f95e70471d64c2fdeb4f050e035)

            Compare: https://github.com/jenkinsci/branch-api-plugin/compare/0d23abd35af7^...1f75509b9f03

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/jenkins/branch/CustomOrganizationFolderDescriptor.java src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java http://jenkins-ci.org/commit/branch-api-plugin/1f75509b9f033532fc852e4937d59cd42b1ab732 Log: Merge pull request #56 from jglick/UnsupportedOperationException- JENKINS-39520 JENKINS-39520 ExtensionList.removeAll is unimplemented (cherry picked from commit f5c8342f2fd73f95e70471d64c2fdeb4f050e035) Compare: https://github.com/jenkinsci/branch-api-plugin/compare/0d23abd35af7 ^...1f75509b9f03

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/ExtensionList.java
            test/pom.xml
            test/src/test/java/hudson/ExtensionListTest.java
            http://jenkins-ci.org/commit/jenkins/e6db919e5f70bb598de3235cbca00ef0a79302e9
            Log:
            JENKINS-39520 ExtensionList.removeAll is unimplemented (#2612)

            • @oleg-nenashev suggests not notifying listeners unless we are actually removing something.
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/ExtensionList.java test/pom.xml test/src/test/java/hudson/ExtensionListTest.java http://jenkins-ci.org/commit/jenkins/e6db919e5f70bb598de3235cbca00ef0a79302e9 Log: JENKINS-39520 ExtensionList.removeAll is unimplemented (#2612) Work around SUREFIRE-1226 just like https://github.com/jenkinsci/plugin-pom/pull/33 . JENKINS-39520 Implement ExtensionList.removeAll. @oleg-nenashev suggests not notifying listeners unless we are actually removing something.

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/jenkins/branch/CustomOrganizationFolderDescriptor.java
            src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java
            http://jenkins-ci.org/commit/branch-api-plugin/f5c8342f2fd73f95e70471d64c2fdeb4f050e035
            Log:
            Merge pull request #56 from jglick/UnsupportedOperationException-JENKINS-39520

            JENKINS-39520 ExtensionList.removeAll is unimplemented

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/jenkins/branch/CustomOrganizationFolderDescriptor.java src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java http://jenkins-ci.org/commit/branch-api-plugin/f5c8342f2fd73f95e70471d64c2fdeb4f050e035 Log: Merge pull request #56 from jglick/UnsupportedOperationException- JENKINS-39520 JENKINS-39520 ExtensionList.removeAll is unimplemented

            People

              jglick Jesse Glick
              jglick Jesse Glick
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: