mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-23 02:12:54 +00:00
Fix calls to Class.newInstance() deprecated in Java 9
This commit is contained in:
1 parent
f2ae1bfe09
commit
8a89b3da29
5 files changed
+5
-5
No files matched your search
@@ -637,7 +637,7 @@ public class KBucketSet<T extends SimpleDataStructure> {
|
||||
throw new IllegalArgumentException("bad length " + dlen + " > " + len);
|
||||
T rv;
|
||||
try {
|
||||
rv = (T) _us.getClass().newInstance();
|
||||
rv = (T) _us.getClass().getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
_log.error("fail", e);
|
||||
throw new RuntimeException(e);
|
||||
|
||||
Reference in new issue
Block a user