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

AbstractLazyLoadRunMap.iterator() calls .all()

XMLWordPrintable

      Merely calling job.getBuilds().isEmpty() breaks lazy-loading:

      	at hudson.model.Run.onLoad(Run.java:319)
      	at hudson.model.RunMap.retrieve(RunMap.java:226)
      	at hudson.model.RunMap.retrieve(RunMap.java:59)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:667)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:650)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.all(AbstractLazyLoadRunMap.java:602)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.entrySet(AbstractLazyLoadRunMap.java:264)
      	at java.util.AbstractMap$2$1.<init>(AbstractMap.java:378)
      	at java.util.AbstractMap$2.iterator(AbstractMap.java:377)
      	at hudson.util.RunList$2.iterator(RunList.java:213)
      	at hudson.util.RunList.iterator(RunList.java:103)
      	at hudson.util.RunList.isEmpty(RunList.java:173)
      

      You would reasonably expect this method, and anything simply iterating builds, to be lazy, but it is eager.

            kohsuke Kohsuke Kawaguchi
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: