stan.java
stan.java copied to clipboard
InterruptedException in connect method signature
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.
Probably overkill, I don't think it get the exception again.