Skip to content

Commit

Permalink
Removes extra exception printed on initializing delegating channels.
Browse files Browse the repository at this point in the history
  • Loading branch information
damencho authored and bgrozev committed Jun 7, 2019
1 parent c7c4719 commit 0b052e8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
Expand Up @@ -85,10 +85,6 @@ public DelegatingServerSocketChannel(T delegate)
catch(NoSuchMethodException e) catch(NoSuchMethodException e)
{ {
method = null; method = null;

classLogger.log(
Level.SEVERE,
"Cannot find method translateAndSetInterestOps", e);
} }
translateAndSetInterestOpsMethod = method; translateAndSetInterestOpsMethod = method;


Expand All @@ -101,10 +97,16 @@ public DelegatingServerSocketChannel(T delegate)
{ {
method = null; method = null;


classLogger.log(
Level.SEVERE, "Cannot find method translateInterestOps", e);
} }
translateInterestOpsMethod = method; translateInterestOpsMethod = method;

if (translateInterestOpsMethod == null
&& translateAndSetInterestOpsMethod == null)
{
classLogger.log(
Level.SEVERE, "Cannot find translateInterestOps " +
"or translateAndSetInterestOps!");
}
} }


/** /**
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/org/ice4j/socket/jdk8/DelegatingSocketChannel.java
Expand Up @@ -85,9 +85,6 @@ public DelegatingSocketChannel(T delegate)
{ {
method = null; method = null;


classLogger.log(
Level.SEVERE,
"Cannot find method translateAndSetInterestOps", e);
} }
translateAndSetInterestOpsMethod = method; translateAndSetInterestOpsMethod = method;


Expand All @@ -99,11 +96,16 @@ public DelegatingSocketChannel(T delegate)
catch(NoSuchMethodException e) catch(NoSuchMethodException e)
{ {
method = null; method = null;
}
translateInterestOpsMethod = method;


if (translateInterestOpsMethod == null
&& translateAndSetInterestOpsMethod == null)
{
classLogger.log( classLogger.log(
Level.SEVERE, "Cannot find method translateInterestOps", e); Level.SEVERE, "Cannot find translateInterestOps " +
"or translateAndSetInterestOps!");
} }
translateInterestOpsMethod = method;
} }


/** /**
Expand Down

0 comments on commit 0b052e8

Please sign in to comment.