Skip to content

Commit

Permalink
Removing some warnings
Browse files Browse the repository at this point in the history
- unused attributes.
- unused private methodes.
  • Loading branch information
fbacchella committed Feb 12, 2019
1 parent 2d035fd commit 0f19bf0
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 32 deletions.
9 changes: 1 addition & 8 deletions src/main/java/org/zeromq/ZPoller.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import java.util.HashSet;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -333,7 +332,6 @@ private ZPoller(final ItemCreator creator, final ZContext context, final Selecto
Objects.requireNonNull(selector, "Selector is mandatory for ZPoller");

this.creator = creator;
this.context = Optional.ofNullable(context);
this.selector = selector;
items = new HashMap<>();
all = createContainer(0);
Expand Down Expand Up @@ -743,13 +741,8 @@ public void close() throws IOException
*/
public void destroy()
{
// if we created the selector,
// it is our responsibility to close it.
context.ifPresent(ctx -> ctx.closeSelector(selector));
}

// optional context for the poller.
private final Optional<ZContext> context;
}

// selector used for polling
private final Selector selector;
Expand Down
8 changes: 0 additions & 8 deletions src/main/java/org/zeromq/ZStar.java
Original file line number Diff line number Diff line change
Expand Up @@ -453,14 +453,6 @@ protected ZAgent agent(Socket phone, String secret)
return ZAgent.Creator.create(phone, secret);
}

/**
* @return the context. Never null. If provided context in constructor was null, returns the auto-generated context for that star.
*/
private ZContext context()
{
return context;
}

// the plateau where the acting will take place (stage and backstage), or
// the forked runnable containing the loop processing all messages in the background
private static final class Plateau implements IAttachedRunnable, Exit
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/zmq/ZMQ.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,6 @@ private static void destroyContext(Ctx ctx)
ctx.terminate();
}

private static void shutdownContext(Ctx ctx)
{
checkContext(ctx);
ctx.shutdown();
}

public static void setContextOption(Ctx ctx, int option, int optval)
{
checkContext(ctx);
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/zmq/io/net/tcp/SocksConnecter.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// TODO continue socks connecter
public class SocksConnecter extends TcpConnecter
{
// Method ID
private static final int SOCKS_NO_AUTH_REQUIRED = 0;

private Address proxyAddress;

private enum Status
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/zmq/io/net/tcp/TcpConnecter.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ public class TcpConnecter extends Own implements IPollEvents
// Current reconnect ivl, updated for backoff strategy
private int currentReconnectIvl;

// String representation of endpoint to connect to
private final String endpoint;

// Socket
private final SocketBase socket;

Expand All @@ -67,7 +64,6 @@ public TcpConnecter(IOThread ioThread, SessionBase session, final Options option
assert (this.addr != null);
// assert (NetProtocol.tcp.equals(this.addr.protocol())); // not always true, as ipc is emulated by tcp

endpoint = this.addr.toString();
socket = session.getSocket();
}

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/zmq/io/net/tipc/TipcListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
import zmq.Options;
import zmq.SocketBase;
import zmq.io.IOThread;
import zmq.io.net.ipc.IpcAddress;
import zmq.io.net.tcp.TcpListener;

public class TipcListener extends TcpListener
{
private IpcAddress address;

public TipcListener(IOThread ioThread, SocketBase socket, final Options options)
{
super(ioThread, socket, options);
Expand Down

0 comments on commit 0f19bf0

Please sign in to comment.