Skip to content

Commit

Permalink
JENKINS-21600 Fixed max number of history entries issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jochen Fürbacher committed Aug 22, 2017
1 parent a94a5dc commit 89ed7dc
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -44,6 +44,8 @@
import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.export.ExportedBean;

import com.thoughtworks.xstream.io.binary.Token.Value;

import hudson.XmlFile;
import hudson.maven.MavenModule;
import hudson.model.AbstractItem;
Expand Down Expand Up @@ -134,8 +136,8 @@ public final List<ConfigInfo> getJobConfigs() throws IOException {
} else {
maxEntriesPerPage = values.size();
}
for (final HistoryDescr historyDescr : values.subList(0,
maxEntriesPerPage)) {
for (final HistoryDescr historyDescr : values
.subList(values.size() - maxEntriesPerPage, values.size())) {
final String timestamp = historyDescr.getTimestamp();
final XmlFile oldRevision = getHistoryDao().getOldRevision(project,
timestamp);
Expand Down

0 comments on commit 89ed7dc

Please sign in to comment.