Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-38098] Do not throw exception when fewer timestamps than exp…
…ected
  • Loading branch information
StevenGBrown committed Sep 19, 2016
1 parent ca4961e commit 47dffcf
Showing 1 changed file with 2 additions and 5 deletions.
Expand Up @@ -103,16 +103,13 @@ public void skip(int count) throws IOException {
*/
public int getAbs(int lineNumber) throws IOException {
int toSkip = lineNumber * (-1);
Optional<Timestamp> timestamp;

for (int i = 0; i <= toSkip; i++) {
timestamp = read();
if (!timestamp.isPresent()) {
throw new IOException("It should contain at least " + toSkip + " timestamps");
}
read();
}

int numberOfTimestampsFromStart = 0;
Optional<Timestamp> timestamp;

do {
timestamp = read();
Expand Down

0 comments on commit 47dffcf

Please sign in to comment.