deprecate ZipFileComment

This commit is contained in:
zzz
2017-04-04 14:01:04 +00:00
parent bfc04178a6
commit 021067dab9
2 changed files with 6 additions and 3 deletions

View File

@ -23,7 +23,7 @@ import net.i2p.data.SigningPublicKey;
import net.i2p.util.Log; import net.i2p.util.Log;
import net.i2p.util.SecureFileOutputStream; import net.i2p.util.SecureFileOutputStream;
import net.i2p.util.VersionComparator; import net.i2p.util.VersionComparator;
import net.i2p.util.ZipFileComment; //import net.i2p.util.ZipFileComment;
/** /**
* <p>Handles DSA signing and verification of update files. * <p>Handles DSA signing and verification of update files.
@ -611,9 +611,10 @@ riCe6OlAEiNpcc6mMyIYYWFICbrDFTrDR3wXqwc/Jkcx6L5VVWoagpSzbo3yGhc=
* *
* @since 0.8.8 * @since 0.8.8
*/ */
@SuppressWarnings("deprecation")
private boolean verifyVersionMatch(File signedFile) { private boolean verifyVersionMatch(File signedFile) {
try { 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); return zipComment.equals(_newVersion);
} catch (IOException ioe) {} } catch (IOException ioe) {}
return false; return false;

View File

@ -19,8 +19,10 @@ import net.i2p.data.DataHelper;
* http://www.flattermann.net/2009/01/read-a-zip-file-comment-with-java/ * http://www.flattermann.net/2009/01/read-a-zip-file-comment-with-java/
* Beerware. * Beerware.
* *
* since 0.8.8 * @deprecated scheduled for removal late 2017, not for external use
* @since 0.8.8
*/ */
@Deprecated
public abstract class ZipFileComment { public abstract class ZipFileComment {
private static final int BLOCK_LEN = 22; private static final int BLOCK_LEN = 22;