Skip to content

Commit

Permalink
Merge pull request #123 from jglick/requireUpperBoundDeps-JENKINS-41631
Browse files Browse the repository at this point in the history
[JENKINS-41631] Lower Guava dep to 11, which is what Jenkins still uses
  • Loading branch information
jglick authored Aug 3, 2017
2 parents 2c35c62 + f3419f0 commit 75268e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>14.0</version>
<version>11.0.1</version>
</dependency>
<dependency>
<groupId>org.kohsuke</groupId>
Expand Down
7 changes: 5 additions & 2 deletions core/src/main/java/org/kohsuke/stapler/export/Range.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ public <T> Iterable<T> apply(final Iterable<T> s) {
public Iterator<T> iterator() {
Iterator<T> itr = s.iterator();
itr = Iterators.limit(itr,max);
if (min>0)
Iterators.advance(itr,min);
if (min > 0) {
for (int i = 0; i < min && itr.hasNext(); i++) {
itr.next();
}
}
return itr;
}
};
Expand Down

0 comments on commit 75268e8

Please sign in to comment.