forked from I2P_Developers/i2p.i2p
Linting dep-ann: Added @Deprecated annotations in i2psnark, i2ptunnel, ministreaming, routerconsole, streaming
This commit is contained in:
@ -194,6 +194,7 @@ public class Peer implements Comparable<Peer>
|
||||
* Compares the PeerIDs.
|
||||
* @deprecated unused?
|
||||
*/
|
||||
@Deprecated
|
||||
public int compareTo(Peer p)
|
||||
{
|
||||
int rv = peerID.compareTo(p.peerID);
|
||||
@ -531,6 +532,7 @@ public class Peer implements Comparable<Peer>
|
||||
* @deprecated deadlocks
|
||||
* @since 0.8.1
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRequesting(int p) {
|
||||
PeerState s = state;
|
||||
return s != null && s.isRequesting(p);
|
||||
@ -563,6 +565,7 @@ public class Peer implements Comparable<Peer>
|
||||
* us then we start downloading from it. Has no effect when not connected.
|
||||
* @deprecated unused
|
||||
*/
|
||||
@Deprecated
|
||||
public void setInteresting(boolean interest)
|
||||
{
|
||||
PeerState s = state;
|
||||
|
@ -196,6 +196,7 @@ public class PeerID implements Comparable<PeerID>
|
||||
* Compares port, address and id.
|
||||
* @deprecated unused? and will NPE now that address can be null?
|
||||
*/
|
||||
@Deprecated
|
||||
public int compareTo(PeerID pid)
|
||||
{
|
||||
int result = port - pid.port;
|
||||
|
@ -30,6 +30,7 @@ import net.i2p.data.DataHelper;
|
||||
*
|
||||
* @deprecated unused, for command line client only, commented out in Snark.java
|
||||
*/
|
||||
@Deprecated
|
||||
class PeerMonitorTask implements Runnable
|
||||
{
|
||||
final static long MONITOR_PERIOD = 10 * 1000; // Ten seconds.
|
||||
|
@ -744,6 +744,7 @@ class PeerState implements DataLoader
|
||||
* @deprecated deadlocks
|
||||
* @since 0.8.1
|
||||
*/
|
||||
@Deprecated
|
||||
synchronized boolean isRequesting(int piece) {
|
||||
if (pendingRequest != null && pendingRequest.getPiece() == piece)
|
||||
return true;
|
||||
|
@ -28,6 +28,7 @@ import net.i2p.util.I2PAppThread;
|
||||
* Makes sure everything ends correctly when shutting down.
|
||||
* @deprecated unused
|
||||
*/
|
||||
@Deprecated
|
||||
public class SnarkShutdown extends I2PAppThread
|
||||
{
|
||||
private final Storage storage;
|
||||
|
@ -10,6 +10,7 @@ import net.i2p.util.FileUtil;
|
||||
/**
|
||||
* @deprecated does not work
|
||||
*/
|
||||
@Deprecated
|
||||
public class RunStandalone {
|
||||
/****
|
||||
static {
|
||||
|
@ -1831,6 +1831,7 @@ public class I2PTunnel extends EventDispatcherImpl implements Logging {
|
||||
* just call context.namingService.lookup() directly.
|
||||
* @deprecated Don't use i2ptunnel for lookup! Use I2PAppContext.getGlobalContext().namingService().lookup(name) from i2p.jar
|
||||
*/
|
||||
@Deprecated
|
||||
public static Destination destFromName(String name) throws DataFormatException {
|
||||
return destFromName(name, null, null, false, null, null);
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ public class I2PTunnelClient extends I2PTunnelClientBase {
|
||||
* list of Destination objects that we point at
|
||||
* @deprecated why protected? Is anybody using out-of-tree? Protected from the beginning (2004)
|
||||
*/
|
||||
@Deprecated
|
||||
protected List<Destination> dests;
|
||||
|
||||
/**
|
||||
|
@ -93,6 +93,7 @@ public class I2PTunnelOutproxyRunner extends I2PAppThread {
|
||||
*
|
||||
* @deprecated unused
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isFinished() {
|
||||
return finished;
|
||||
}
|
||||
@ -104,6 +105,7 @@ public class I2PTunnelOutproxyRunner extends I2PAppThread {
|
||||
* @return date (ms since the epoch), or -1 if no data has been transferred yet
|
||||
* @deprecated unused
|
||||
*/
|
||||
@Deprecated
|
||||
public long getLastActivityOn() {
|
||||
return lastActivityOn;
|
||||
}
|
||||
|
@ -82,6 +82,7 @@ public class I2PTunnelRunner extends I2PAppThread implements I2PSocket.SocketErr
|
||||
* Will synchronize on slock when removing.
|
||||
* @deprecated use FailCallback constructor
|
||||
*/
|
||||
@Deprecated
|
||||
public I2PTunnelRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData,
|
||||
List<I2PSocket> sockList) {
|
||||
this(s, i2ps, slock, initialI2PData, null, sockList, null, null, true);
|
||||
@ -97,6 +98,7 @@ public class I2PTunnelRunner extends I2PAppThread implements I2PSocket.SocketErr
|
||||
* Will synchronize on slock when removing.
|
||||
* @deprecated use FailCallback constructor
|
||||
*/
|
||||
@Deprecated
|
||||
public I2PTunnelRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData,
|
||||
byte[] initialSocketData, List<I2PSocket> sockList) {
|
||||
this(s, i2ps, slock, initialI2PData, initialSocketData, sockList, null, null, true);
|
||||
@ -113,6 +115,7 @@ public class I2PTunnelRunner extends I2PAppThread implements I2PSocket.SocketErr
|
||||
* it will be run before closing s.
|
||||
* @deprecated use FailCallback constructor
|
||||
*/
|
||||
@Deprecated
|
||||
public I2PTunnelRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData,
|
||||
List<I2PSocket> sockList, Runnable onTimeout) {
|
||||
this(s, i2ps, slock, initialI2PData, null, sockList, onTimeout, null, true);
|
||||
@ -130,6 +133,7 @@ public class I2PTunnelRunner extends I2PAppThread implements I2PSocket.SocketErr
|
||||
* it will be run before closing s.
|
||||
* @deprecated use FailCallback constructor
|
||||
*/
|
||||
@Deprecated
|
||||
public I2PTunnelRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData,
|
||||
byte[] initialSocketData, List<I2PSocket> sockList, Runnable onTimeout) {
|
||||
this(s, i2ps, slock, initialI2PData, initialSocketData, sockList, onTimeout, null, true);
|
||||
@ -192,6 +196,7 @@ public class I2PTunnelRunner extends I2PAppThread implements I2PSocket.SocketErr
|
||||
*
|
||||
* @deprecated unused
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isFinished() {
|
||||
return finished;
|
||||
}
|
||||
@ -203,6 +208,7 @@ public class I2PTunnelRunner extends I2PAppThread implements I2PSocket.SocketErr
|
||||
* @return date (ms since the epoch), or -1 if no data has been transferred yet
|
||||
* @deprecated unused
|
||||
*/
|
||||
@Deprecated
|
||||
public long getLastActivityOn() {
|
||||
return lastActivityOn;
|
||||
}
|
||||
|
@ -752,6 +752,7 @@ public class TunnelController implements Logging {
|
||||
* @return one big string of "key=val key=val ..."
|
||||
* @deprecated why would you want this? Use getClientOptionProps() instead
|
||||
*/
|
||||
@Deprecated
|
||||
public String getClientOptions() {
|
||||
StringBuilder opts = new StringBuilder(64);
|
||||
for (Map.Entry<Object, Object> e : _config.entrySet()) {
|
||||
@ -869,6 +870,7 @@ public class TunnelController implements Logging {
|
||||
* A text description of the tunnel.
|
||||
* @deprecated unused
|
||||
*/
|
||||
@Deprecated
|
||||
public void getSummary(StringBuilder buf) {
|
||||
String type = getType();
|
||||
buf.append(type);
|
||||
|
@ -42,6 +42,7 @@ public interface I2PServerSocket {
|
||||
* @return null always
|
||||
* @since 0.8.11
|
||||
*/
|
||||
@Deprecated
|
||||
public AcceptingChannel getChannel();
|
||||
|
||||
/**
|
||||
|
@ -62,6 +62,7 @@ public interface I2PSocket extends Closeable {
|
||||
* @return null always
|
||||
* @since 0.8.9
|
||||
*/
|
||||
@Deprecated
|
||||
public SelectableChannel getChannel() throws IOException;
|
||||
|
||||
/**
|
||||
|
@ -37,6 +37,7 @@ public class I2PSocketManagerFactory {
|
||||
* Ignored since 0.9.12, cannot be changed via properties.
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String PROP_MANAGER = "i2p.streaming.manager";
|
||||
|
||||
/**
|
||||
|
@ -10,4 +10,5 @@ package net.i2p.client.streaming;
|
||||
* @since 0.9.12
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public class I2PSocketManagerFull {}
|
||||
|
@ -149,6 +149,7 @@ public class ConfigNetHelper extends HelperBase {
|
||||
* This isn't updated for the new statuses, but it's commented out in the jsp.
|
||||
* @deprecated unused, to be fixed if needed
|
||||
*/
|
||||
@Deprecated
|
||||
public String getRequireIntroductionsChecked() {
|
||||
Status status = _context.commSystem().getStatus();
|
||||
switch (status) {
|
||||
|
@ -48,9 +48,10 @@ class SummaryRenderer {
|
||||
* DOM level 3 load and store support. Perhaps we can bundle that, or
|
||||
* specify who can get it from where, etc.
|
||||
*
|
||||
* @deprecated unsed
|
||||
* @deprecated unused
|
||||
* @throws UnsupportedOperationException always
|
||||
*/
|
||||
@Deprecated
|
||||
public static synchronized void render(I2PAppContext ctx, OutputStream out, String filename) throws IOException {
|
||||
throw new UnsupportedOperationException();
|
||||
/*****
|
||||
|
@ -538,6 +538,7 @@ class ConnectionOptions extends I2PSocketOptionsImpl {
|
||||
* @deprecated This doesn't appear to be used.
|
||||
* @return receive window size.
|
||||
*/
|
||||
@Deprecated
|
||||
public int getReceiveWindow() { return _receiveWindow; }
|
||||
public void setReceiveWindow(int numMsgs) { _receiveWindow = numMsgs; }
|
||||
|
||||
|
@ -45,6 +45,7 @@ class I2PServerSocketFull implements I2PServerSocket {
|
||||
* @return null always
|
||||
* @since 0.8.11
|
||||
*/
|
||||
@Deprecated
|
||||
public synchronized AcceptingChannel getChannel() {
|
||||
return null;
|
||||
}
|
||||
|
@ -96,6 +96,7 @@ class I2PSocketFull implements I2PSocket {
|
||||
* @return null always
|
||||
* @since 0.8.9
|
||||
*/
|
||||
@Deprecated
|
||||
public synchronized SelectableChannel getChannel() {
|
||||
return null;
|
||||
}
|
||||
|
@ -168,6 +168,7 @@ public class I2PSocketManagerFull implements I2PSocketManager {
|
||||
* @deprecated use 4-arg constructor
|
||||
* @throws UnsupportedOperationException always
|
||||
*/
|
||||
@Deprecated
|
||||
public I2PSocketManagerFull() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
@ -176,6 +177,7 @@ public class I2PSocketManagerFull implements I2PSocketManager {
|
||||
* @deprecated use 4-arg constructor
|
||||
* @throws UnsupportedOperationException always
|
||||
*/
|
||||
@Deprecated
|
||||
public void init(I2PAppContext context, I2PSession session, Properties opts, String name) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
@ -66,11 +66,13 @@ class PacketLocal extends Packet implements MessageOutputStream.WriteStatus {
|
||||
/**
|
||||
* @deprecated should always return null
|
||||
*/
|
||||
@Deprecated
|
||||
public SessionKey getKeyUsed() { return _keyUsed; }
|
||||
|
||||
/**
|
||||
* @deprecated I2PSession throws out the tags
|
||||
*/
|
||||
@Deprecated
|
||||
public void setKeyUsed(SessionKey key) {
|
||||
if (key != null)
|
||||
_log.error("Who is sending tags thru the streaming lib?");
|
||||
@ -80,11 +82,13 @@ class PacketLocal extends Packet implements MessageOutputStream.WriteStatus {
|
||||
/**
|
||||
* @deprecated should always return null or an empty set
|
||||
*/
|
||||
@Deprecated
|
||||
public Set<SessionTag> getTagsSent() { return Collections.emptySet(); }
|
||||
|
||||
/**
|
||||
* @deprecated I2PSession throws out the tags
|
||||
*/
|
||||
@Deprecated
|
||||
public void setTagsSent(Set<SessionTag> tags) {
|
||||
if (tags != null && !tags.isEmpty())
|
||||
_log.error("Who is sending tags thru the streaming lib? " + tags.size());
|
||||
|
@ -12,6 +12,7 @@ public class RetransmissionTimer extends SimpleTimer2 {
|
||||
* @deprecated Don't use this to prestart threads, this is no longer a static instance
|
||||
* @return a new instance as of 0.9
|
||||
*/
|
||||
@Deprecated
|
||||
public static final RetransmissionTimer getInstance() {
|
||||
return new RetransmissionTimer(I2PAppContext.getGlobalContext(), "RetransmissionTimer");
|
||||
}
|
||||
|
Reference in New Issue
Block a user