Skip to content

Commit

Permalink
Merge branch '2.1.x' into 2.2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Jan 15, 2020
2 parents 1846279 + ebebe09 commit b7e250e
Showing 1 changed file with 7 additions and 6 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -595,11 +595,12 @@ void jarFileEntryWithEpochTimeOfZeroShouldNotFail() throws Exception {
jarOutputStream.write(new byte[] { (byte) 1 });
jarOutputStream.closeEntry();
}
JarFile jarFile = new JarFile(file);
Enumeration<java.util.jar.JarEntry> entries = jarFile.entries();
JarEntry entry = entries.nextElement();
assertThat(entry.getLastModifiedTime().toInstant()).isEqualTo(Instant.EPOCH);
assertThat(entry.getName()).isEqualTo("1.dat");
try (JarFile jar = new JarFile(file)) {
Enumeration<java.util.jar.JarEntry> entries = jar.entries();
JarEntry entry = entries.nextElement();
assertThat(entry.getLastModifiedTime().toInstant()).isEqualTo(Instant.EPOCH);
assertThat(entry.getName()).isEqualTo("1.dat");
}
}

private int getJavaVersion() {
Expand Down

0 comments on commit b7e250e

Please sign in to comment.