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

Use of beta Guava method since deleted: Iterators.skip

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Jenkins core currently bundles Guava 11. I found that if a plugin which is using a newer release of Guava, by masking Guava classes from core or using pluginFirstClassLoader, runs certain kinds of functional tests, it can get linkage errors:

      java.lang.NoSuchMethodError: com.google.common.collect.Iterators.skip(Ljava/util/Iterator;I)I
      	at hudson.util.RunList.subList(RunList.java:153)
      	at hudson.tasks.LogRotator.perform(LogRotator.java:153)
      	at hudson.model.Job.logRotate(Job.java:468)
      	at ...
      

      Iterators.skip is @Beta in Guava 11 and was deleted in Guava 14. Anyway it is a pretty trivial utility method, so it can just go into hudson.util.Iterators or be inlined.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/util/Iterators.java
            core/src/main/java/hudson/util/RunList.java
            core/src/main/java/jenkins/widgets/HistoryPageFilter.java
            core/src/test/java/hudson/util/IteratorsTest.java
            http://jenkins-ci.org/commit/jenkins/a846c366fe1569805548544118d65d908de5644a
            Log:
            JENKINS-51779 Avoid com.google.common.collect.Iterators.skip (#3481)

            • Reviewers preferred for the new method to be restricted for now.

            *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

            Functionality will be removed from GitHub.com on January 31st, 2019.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/util/Iterators.java core/src/main/java/hudson/util/RunList.java core/src/main/java/jenkins/widgets/HistoryPageFilter.java core/src/test/java/hudson/util/IteratorsTest.java http://jenkins-ci.org/commit/jenkins/a846c366fe1569805548544118d65d908de5644a Log: JENKINS-51779 Avoid com.google.common.collect.Iterators.skip (#3481) JENKINS-51779 Avoid com.google.common.collect.Iterators.skip. Reviewers preferred for the new method to be restricted for now. * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Fixed in Jenkins 2.127

            Show
            oleg_nenashev Oleg Nenashev added a comment - Fixed in Jenkins 2.127

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: