src/share/classes/java/util/zip/ZipEntry.java
Print this page
rev 4793 : 7117249: java.util warnings patches from LJC/Mike Barker
@@ -279,10 +279,12 @@
/*
* Converts DOS time to Java time (number of milliseconds since epoch).
*/
private static long dosToJavaTime(long dtime) {
+ @SuppressWarnings("deprecation") // Changing to j.u.Calendar would have an
+ // unknown impact on performance/gc.
Date d = new Date((int)(((dtime >> 25) & 0x7f) + 80),
(int)(((dtime >> 21) & 0x0f) - 1),
(int)((dtime >> 16) & 0x1f),
(int)((dtime >> 11) & 0x1f),
(int)((dtime >> 5) & 0x3f),
@@ -291,10 +293,12 @@
}
/*
* Converts Java time to DOS time.
*/
+ @SuppressWarnings("deprecation") // Changing to j.u.Calendar would have an
+ // unknown impact on performance/gc.
private static long javaToDosTime(long time) {
Date d = new Date(time);
int year = d.getYear() + 1900;
if (year < 1980) {
return (1 << 21) | (1 << 16);