From e78dd1fdc3ffc6f0000c3fd5cc6e089fbe66d830 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Tue, 24 Nov 2009 20:08:58 +0000 Subject: [PATCH] remove unused Logs from DataStructures --- core/java/src/net/i2p/data/Address.java | 3 --- core/java/src/net/i2p/data/Certificate.java | 5 ++--- core/java/src/net/i2p/data/DataFormatException.java | 4 +--- core/java/src/net/i2p/data/DataHelper.java | 2 +- core/java/src/net/i2p/data/Destination.java | 3 --- core/java/src/net/i2p/data/Lease.java | 4 +--- core/java/src/net/i2p/data/PrivateKey.java | 2 -- core/java/src/net/i2p/data/PublicKey.java | 3 --- core/java/src/net/i2p/data/RouterAddress.java | 3 --- core/java/src/net/i2p/data/SessionKey.java | 3 --- core/java/src/net/i2p/data/Signature.java | 3 --- core/java/src/net/i2p/data/SigningPrivateKey.java | 2 -- core/java/src/net/i2p/data/SigningPublicKey.java | 3 --- core/java/src/net/i2p/data/TunnelId.java | 3 --- core/java/src/net/i2p/data/VerifiedDestination.java | 3 --- 15 files changed, 5 insertions(+), 41 deletions(-) diff --git a/core/java/src/net/i2p/data/Address.java b/core/java/src/net/i2p/data/Address.java index 3a69a232f3..a34f773f36 100644 --- a/core/java/src/net/i2p/data/Address.java +++ b/core/java/src/net/i2p/data/Address.java @@ -4,10 +4,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import net.i2p.util.Log; - public class Address extends DataStructureImpl { - private final static Log _log = new Log(Address.class); private String _hostname; private Destination _destination; diff --git a/core/java/src/net/i2p/data/Certificate.java b/core/java/src/net/i2p/data/Certificate.java index 0fe61e5c02..f20f8322bc 100644 --- a/core/java/src/net/i2p/data/Certificate.java +++ b/core/java/src/net/i2p/data/Certificate.java @@ -13,8 +13,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import net.i2p.util.Log; - /** * Defines a certificate that can be attached to various I2P structures, such * as RouterIdentity and Destination, allowing routers and clients to help @@ -23,10 +21,11 @@ import net.i2p.util.Log; * certificate authority, though that use probably isn't appropriate for an * anonymous network ;) * + * Todo: Properly support multiple certificates + * * @author jrandom */ public class Certificate extends DataStructureImpl { - private final static Log _log = new Log(Certificate.class); private int _type; private byte[] _payload; diff --git a/core/java/src/net/i2p/data/DataFormatException.java b/core/java/src/net/i2p/data/DataFormatException.java index 95e0d26c82..290afb5e98 100644 --- a/core/java/src/net/i2p/data/DataFormatException.java +++ b/core/java/src/net/i2p/data/DataFormatException.java @@ -10,7 +10,6 @@ package net.i2p.data; */ import net.i2p.I2PException; -import net.i2p.util.Log; /** * Thrown when the data was not available to read or write a DataStructure @@ -18,7 +17,6 @@ import net.i2p.util.Log; * @author jrandom */ public class DataFormatException extends I2PException { - private final static Log _log = new Log(DataFormatException.class); public DataFormatException(String msg, Throwable t) { super(msg, t); @@ -27,4 +25,4 @@ public class DataFormatException extends I2PException { public DataFormatException(String msg) { super(msg); } -} \ No newline at end of file +} diff --git a/core/java/src/net/i2p/data/DataHelper.java b/core/java/src/net/i2p/data/DataHelper.java index 96f9a0814a..9822415812 100644 --- a/core/java/src/net/i2p/data/DataHelper.java +++ b/core/java/src/net/i2p/data/DataHelper.java @@ -294,7 +294,7 @@ public class DataHelper { } /** - * Writes the props to the file, unsorted. + * Writes the props to the file, unsorted (unless props is an OrderedProperties) * Note that this does not escape the \r or \n that are unescaped in loadProps() above. */ public static void storeProps(Properties props, File file) throws IOException { diff --git a/core/java/src/net/i2p/data/Destination.java b/core/java/src/net/i2p/data/Destination.java index 7419e11ed5..bebfde69ed 100644 --- a/core/java/src/net/i2p/data/Destination.java +++ b/core/java/src/net/i2p/data/Destination.java @@ -14,8 +14,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import net.i2p.util.Log; - /** * Defines an end point in the I2P network. The Destination may move around * in the network, but messages sent to the Destination will find it @@ -23,7 +21,6 @@ import net.i2p.util.Log; * @author jrandom */ public class Destination extends DataStructureImpl { - protected final static Log _log = new Log(Destination.class); protected Certificate _certificate; protected SigningPublicKey _signingKey; protected PublicKey _publicKey; diff --git a/core/java/src/net/i2p/data/Lease.java b/core/java/src/net/i2p/data/Lease.java index eb22d64cfe..7a5bde7430 100644 --- a/core/java/src/net/i2p/data/Lease.java +++ b/core/java/src/net/i2p/data/Lease.java @@ -15,7 +15,6 @@ import java.io.OutputStream; import java.util.Date; import net.i2p.util.Clock; -import net.i2p.util.Log; /** * Defines the proof that a particular router / tunnel is allowed to receive @@ -24,7 +23,6 @@ import net.i2p.util.Log; * @author jrandom */ public class Lease extends DataStructureImpl { - private final static Log _log = new Log(Lease.class); private Hash _gateway; private TunnelId _tunnelId; private Date _end; @@ -155,4 +153,4 @@ public class Lease extends DataStructureImpl { buf.append("]"); return buf.toString(); } -} \ No newline at end of file +} diff --git a/core/java/src/net/i2p/data/PrivateKey.java b/core/java/src/net/i2p/data/PrivateKey.java index eed7f1eb77..c4c34b0e89 100644 --- a/core/java/src/net/i2p/data/PrivateKey.java +++ b/core/java/src/net/i2p/data/PrivateKey.java @@ -14,7 +14,6 @@ import java.io.InputStream; import java.io.OutputStream; import net.i2p.crypto.KeyGenerator; -import net.i2p.util.Log; /** * Defines the PrivateKey as defined by the I2P data structure spec. @@ -24,7 +23,6 @@ import net.i2p.util.Log; * @author jrandom */ public class PrivateKey extends DataStructureImpl { - private final static Log _log = new Log(PrivateKey.class); private byte[] _data; public final static int KEYSIZE_BYTES = 256; diff --git a/core/java/src/net/i2p/data/PublicKey.java b/core/java/src/net/i2p/data/PublicKey.java index 01bca46e5c..3496f8d55e 100644 --- a/core/java/src/net/i2p/data/PublicKey.java +++ b/core/java/src/net/i2p/data/PublicKey.java @@ -13,8 +13,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import net.i2p.util.Log; - /** * Defines the PublicKey as defined by the I2P data structure spec. * A public key is 256byte Integer. The public key represents only the @@ -23,7 +21,6 @@ import net.i2p.util.Log; * @author jrandom */ public class PublicKey extends DataStructureImpl { - private final static Log _log = new Log(PublicKey.class); private byte[] _data; public final static int KEYSIZE_BYTES = 256; diff --git a/core/java/src/net/i2p/data/RouterAddress.java b/core/java/src/net/i2p/data/RouterAddress.java index f353f7d739..0f03d9d346 100644 --- a/core/java/src/net/i2p/data/RouterAddress.java +++ b/core/java/src/net/i2p/data/RouterAddress.java @@ -16,15 +16,12 @@ import java.util.Date; import java.util.Iterator; import java.util.Properties; -import net.i2p.util.Log; - /** * Defines a method of communicating with a router * * @author jrandom */ public class RouterAddress extends DataStructureImpl { - private final static Log _log = new Log(RouterAddress.class); private int _cost; private Date _expiration; private String _transportStyle; diff --git a/core/java/src/net/i2p/data/SessionKey.java b/core/java/src/net/i2p/data/SessionKey.java index 17190ef3f0..deaf292b53 100644 --- a/core/java/src/net/i2p/data/SessionKey.java +++ b/core/java/src/net/i2p/data/SessionKey.java @@ -13,8 +13,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import net.i2p.util.Log; - /** * Defines the SessionKey as defined by the I2P data structure spec. * A session key is 32byte Integer. @@ -22,7 +20,6 @@ import net.i2p.util.Log; * @author jrandom */ public class SessionKey extends DataStructureImpl { - private final static Log _log = new Log(SessionKey.class); private byte[] _data; private Object _preparedKey; diff --git a/core/java/src/net/i2p/data/Signature.java b/core/java/src/net/i2p/data/Signature.java index cb43741c5e..2c35edebc2 100644 --- a/core/java/src/net/i2p/data/Signature.java +++ b/core/java/src/net/i2p/data/Signature.java @@ -13,8 +13,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import net.i2p.util.Log; - /** * Defines the signature as defined by the I2P data structure spec. * A signature is a 40byte Integer verifying the authenticity of some data @@ -23,7 +21,6 @@ import net.i2p.util.Log; * @author jrandom */ public class Signature extends DataStructureImpl { - private final static Log _log = new Log(Signature.class); private byte[] _data; public final static int SIGNATURE_BYTES = 40; diff --git a/core/java/src/net/i2p/data/SigningPrivateKey.java b/core/java/src/net/i2p/data/SigningPrivateKey.java index 1d2e95cb0a..3c1e712546 100644 --- a/core/java/src/net/i2p/data/SigningPrivateKey.java +++ b/core/java/src/net/i2p/data/SigningPrivateKey.java @@ -14,7 +14,6 @@ import java.io.InputStream; import java.io.OutputStream; import net.i2p.crypto.KeyGenerator; -import net.i2p.util.Log; /** * Defines the SigningPrivateKey as defined by the I2P data structure spec. @@ -25,7 +24,6 @@ import net.i2p.util.Log; * @author jrandom */ public class SigningPrivateKey extends DataStructureImpl { - private final static Log _log = new Log(SigningPrivateKey.class); private byte[] _data; public final static int KEYSIZE_BYTES = 20; diff --git a/core/java/src/net/i2p/data/SigningPublicKey.java b/core/java/src/net/i2p/data/SigningPublicKey.java index 44b8f3c137..2d2cf2f9b9 100644 --- a/core/java/src/net/i2p/data/SigningPublicKey.java +++ b/core/java/src/net/i2p/data/SigningPublicKey.java @@ -13,8 +13,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import net.i2p.util.Log; - /** * Defines the SigningPublicKey as defined by the I2P data structure spec. * A public key is 256byte Integer. The public key represents only the @@ -24,7 +22,6 @@ import net.i2p.util.Log; * @author jrandom */ public class SigningPublicKey extends DataStructureImpl { - private final static Log _log = new Log(SigningPublicKey.class); private byte[] _data; public final static int KEYSIZE_BYTES = 128; diff --git a/core/java/src/net/i2p/data/TunnelId.java b/core/java/src/net/i2p/data/TunnelId.java index e9ed13cff9..c692d70c8c 100644 --- a/core/java/src/net/i2p/data/TunnelId.java +++ b/core/java/src/net/i2p/data/TunnelId.java @@ -12,8 +12,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import net.i2p.util.Log; - /** * Defines the tunnel ID that messages are passed through on a set of routers. * This is not globally unique, but must be unique on each router making up @@ -23,7 +21,6 @@ import net.i2p.util.Log; * @author jrandom */ public class TunnelId extends DataStructureImpl { - private final static Log _log = new Log(TunnelId.class); private long _tunnelId; private int _type; diff --git a/core/java/src/net/i2p/data/VerifiedDestination.java b/core/java/src/net/i2p/data/VerifiedDestination.java index 19fd1079ee..dee86800da 100644 --- a/core/java/src/net/i2p/data/VerifiedDestination.java +++ b/core/java/src/net/i2p/data/VerifiedDestination.java @@ -13,8 +13,6 @@ import java.security.NoSuchAlgorithmException; import com.nettgryppa.security.HashCash; -import net.i2p.util.Log; - /** * Extend Destination with methods to verify its Certificate. * The router does not check Certificates, it doesn't care. @@ -26,7 +24,6 @@ import net.i2p.util.Log; * @author zzz */ public class VerifiedDestination extends Destination { - protected final static Log _log = new Log(Destination.class); public VerifiedDestination() { super(); -- GitLab