Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing some warning: #657

Merged
merged 1 commit into from
Feb 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,14 +741,9 @@ 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));
// Nothing to do
}

// 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