Skip to content

Commit 65e1cae

Browse files
committed
Cleanup unnecessary code
1 parent 379a825 commit 65e1cae

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

reactor/src/main/java/com/iluwatar/reactor/framework/NioReactor.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,8 @@ public NioReactor(Dispatcher dispatcher) throws IOException {
8484

8585
/**
8686
* Starts the reactor event loop in a new thread.
87-
*
88-
* @throws IOException
89-
* if any I/O error occurs.
9087
*/
91-
public void start() throws IOException {
88+
public void start() {
9289
reactorMain.execute(() -> {
9390
try {
9491
LOGGER.info("Reactor started, waiting for events...");

reactor/src/main/java/com/iluwatar/reactor/framework/NioServerSocketChannel.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ public ByteBuffer read(SelectionKey key) throws IOException {
9898
*/
9999
@Override
100100
public void bind() throws IOException {
101-
((ServerSocketChannel) getJavaChannel()).socket().bind(
101+
getJavaChannel().socket().bind(
102102
new InetSocketAddress(InetAddress.getLocalHost(), port));
103-
((ServerSocketChannel) getJavaChannel()).configureBlocking(false);
103+
getJavaChannel().configureBlocking(false);
104104
LOGGER.info("Bound TCP socket at port: {}", port);
105105
}
106106

0 commit comments

Comments
 (0)