diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-03-08 22:42:03 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-11-12 17:39:34 +0100 |
commit | 0ebe3fda88f69572f9a8c829a0d8e3b5a76b4238 (patch) | |
tree | 3fb8ae610bada01d71b4c53b494a718883289f60 /src/main/java/com | |
parent | 2cb990080bb668a766cd13dfc9ec3ccbd4529cbf (diff) |
Remove unneeded declared exceptions
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/lumaserv/bgp/BGPServer.java | 17 | ||||
-rw-r--r-- | src/main/java/com/lumaserv/bgp/BGPSession.java | 2 |
2 files changed, 7 insertions, 12 deletions
diff --git a/src/main/java/com/lumaserv/bgp/BGPServer.java b/src/main/java/com/lumaserv/bgp/BGPServer.java index 78ceee8..53f8af7 100644 --- a/src/main/java/com/lumaserv/bgp/BGPServer.java +++ b/src/main/java/com/lumaserv/bgp/BGPServer.java @@ -143,11 +143,11 @@ public class BGPServer implements Runnable { } } - public boolean connect(BGPSessionConfiguration config, String host) throws IOException { + public boolean connect(BGPSessionConfiguration config, String host) { return connect(config, host, 179); } - public boolean connect(BGPSessionConfiguration config, String host, int port) throws IOException { + public boolean connect(BGPSessionConfiguration config, String host, int port) { for (BGPSession session : sessions) { if (session.getConfiguration().equals(config)) { // Already connected @@ -155,15 +155,10 @@ public class BGPServer implements Runnable { } } - try { - BGPSession session = new BGPSession(this, config, host, port); - sessions.add(session); - session.getFsm().getCurrentState().automaticStart(); - return true; - } catch (IOException ex) { - ex.printStackTrace(); - throw(ex); - } + BGPSession session = new BGPSession(this, config, host, port); + sessions.add(session); + session.getFsm().getCurrentState().automaticStart(); + return true; } public void shutdown() { diff --git a/src/main/java/com/lumaserv/bgp/BGPSession.java b/src/main/java/com/lumaserv/bgp/BGPSession.java index d51a83e..dd2b7ff 100644 --- a/src/main/java/com/lumaserv/bgp/BGPSession.java +++ b/src/main/java/com/lumaserv/bgp/BGPSession.java @@ -50,7 +50,7 @@ public class BGPSession implements Runnable { this.port = -1; } - public BGPSession(BGPServer server, BGPSessionConfiguration configuration, String host, int port) throws IOException { + public BGPSession(BGPServer server, BGPSessionConfiguration configuration, String host, int port) { this.server = server; this.configuration = configuration; this.fsm = new BGPFsm(this); |