From 021067dab93170284c0c6b2a1addd941244ca84b Mon Sep 17 00:00:00 2001 From: zzz Date: Tue, 4 Apr 2017 14:01:04 +0000 Subject: [PATCH] deprecate ZipFileComment --- core/java/src/net/i2p/crypto/TrustedUpdate.java | 5 +++-- core/java/src/net/i2p/util/ZipFileComment.java | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/java/src/net/i2p/crypto/TrustedUpdate.java b/core/java/src/net/i2p/crypto/TrustedUpdate.java index d980f8a45..23520942b 100644 --- a/core/java/src/net/i2p/crypto/TrustedUpdate.java +++ b/core/java/src/net/i2p/crypto/TrustedUpdate.java @@ -23,7 +23,7 @@ import net.i2p.data.SigningPublicKey; import net.i2p.util.Log; import net.i2p.util.SecureFileOutputStream; import net.i2p.util.VersionComparator; -import net.i2p.util.ZipFileComment; +//import net.i2p.util.ZipFileComment; /** *

Handles DSA signing and verification of update files. @@ -611,9 +611,10 @@ riCe6OlAEiNpcc6mMyIYYWFICbrDFTrDR3wXqwc/Jkcx6L5VVWoagpSzbo3yGhc= * * @since 0.8.8 */ + @SuppressWarnings("deprecation") private boolean verifyVersionMatch(File signedFile) { try { - String zipComment = ZipFileComment.getComment(signedFile, VERSION_BYTES, HEADER_BYTES); + String zipComment = net.i2p.util.ZipFileComment.getComment(signedFile, VERSION_BYTES, HEADER_BYTES); return zipComment.equals(_newVersion); } catch (IOException ioe) {} return false; diff --git a/core/java/src/net/i2p/util/ZipFileComment.java b/core/java/src/net/i2p/util/ZipFileComment.java index b0d590fea..6be6fdbf8 100644 --- a/core/java/src/net/i2p/util/ZipFileComment.java +++ b/core/java/src/net/i2p/util/ZipFileComment.java @@ -19,8 +19,10 @@ import net.i2p.data.DataHelper; * http://www.flattermann.net/2009/01/read-a-zip-file-comment-with-java/ * Beerware. * - * since 0.8.8 + * @deprecated scheduled for removal late 2017, not for external use + * @since 0.8.8 */ +@Deprecated public abstract class ZipFileComment { private static final int BLOCK_LEN = 22;