Skip to content

Commit cea334d

Browse files
committed
we have a hub implementation with some little but non-trivial tests.
1 parent fee9341 commit cea334d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/net/sharksystem/asap/ASAPEncounterManagerImpl.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package net.sharksystem.asap;
22

3+
import com.sun.istack.internal.NotNull;
34
import net.sharksystem.asap.protocol.ASAPConnection;
45
import net.sharksystem.asap.protocol.ASAPConnectionListener;
56
import net.sharksystem.asap.utils.PeerIDHelper;
@@ -39,14 +40,11 @@ public class ASAPEncounterManagerImpl implements ASAPEncounterManager, ASAPConne
3940
/** remember remote address of peers (they can have more than one): peerID -> remote address */
4041
private Map<CharSequence, Set<CharSequence>> peerRemoteAddresses = new HashMap<>();
4142

42-
public ASAPEncounterManagerImpl(ASAPConnectionHandler asapConnectionHandler) throws ASAPException {
43+
public ASAPEncounterManagerImpl(@NotNull ASAPConnectionHandler asapConnectionHandler) {
4344
this(asapConnectionHandler, DEFAULT_WAIT_BEFORE_RECONNECT_TIME);
4445
}
4546

46-
public ASAPEncounterManagerImpl(ASAPConnectionHandler asapConnectionHandler, long waitingPeriod)
47-
throws ASAPException {
48-
49-
if(asapConnectionHandler == null) throw new ASAPException("connection manager must not be null");
47+
public ASAPEncounterManagerImpl(@NotNull ASAPConnectionHandler asapConnectionHandler, long waitingPeriod) {
5048
this.asapConnectionHandler = asapConnectionHandler;
5149
this.randomValue = new Random(System.currentTimeMillis()).nextInt();
5250
this.waitBeforeReconnect = waitingPeriod;

0 commit comments

Comments
 (0)