stan.java icon indicating copy to clipboard operation
stan.java copied to clipboard

InterruptedException in connect method signature

Open rregout opened this issue 4 years ago • 1 comments

In the NatsStreaming class the connect method throws an InterruptedException:

    public static StreamingConnection connect(
            String clusterId, String clientId, Options opts)
            throws IOException, InterruptedException {
        try {
            StreamingConnectionImpl conn = new StreamingConnectionImpl(clusterId, clientId, opts);
            conn.connect();
            return conn;
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            return null;
        }
    }

But does can it actually throw the InterruptedException? Because it is already catched in the method it self.

rregout avatar Sep 02 '19 06:09 rregout