mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-02 14:38:28 +00:00
8130914: java/util/zip/TestExtraTime.java fails with "java.lang.RuntimeException: setTime should make getLastModifiedTime return the specified instant: 3078282244456 got: 3078282244455"
Fixed the 32-bit overflow. Reviewed-by: rriggs
This commit is contained in:
parent
47dbbc7b72
commit
3d82fdcaad
@ -99,9 +99,9 @@ class ZipUtils {
|
||||
if (year < 1980) {
|
||||
return ZipEntry.DOSTIME_BEFORE_1980;
|
||||
}
|
||||
return (year - 1980) << 25 | (d.getMonth() + 1) << 21 |
|
||||
d.getDate() << 16 | d.getHours() << 11 | d.getMinutes() << 5 |
|
||||
d.getSeconds() >> 1;
|
||||
return ((year - 1980) << 25 | (d.getMonth() + 1) << 21 |
|
||||
d.getDate() << 16 | d.getHours() << 11 | d.getMinutes() << 5 |
|
||||
d.getSeconds() >> 1) & 0xffffffffL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 4759491 6303183 7012868 8015666 8023713 8068790 8076641 8075526
|
||||
* @bug 4759491 6303183 7012868 8015666 8023713 8068790 8076641 8075526 8130914
|
||||
* @summary Test ZOS and ZIS timestamp in extra field correctly
|
||||
*/
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user