Skip to content

Commit

Permalink
Fix deprecation warning in AbstractMessenger
Browse files Browse the repository at this point in the history
  • Loading branch information
lucko committed May 13, 2021
1 parent 850f446 commit 86274e4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ private static <T> Codec<T> getCodec(TypeToken<T> type) {
Class<? extends Codec<?>> codec = message.codec();
try {
//noinspection unchecked
return (Codec<T>) codec.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
return (Codec<T>) codec.getDeclaredConstructor().newInstance();
} catch (ReflectiveOperationException e) {
e.printStackTrace();
}
}
Expand Down

0 comments on commit 86274e4

Please sign in to comment.