Use of beta Guava method since deleted: Iterators.skip

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

            Assignee:
            Jesse Glick
            Reporter:
            Jesse Glick
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: