forked from I2P_Developers/i2p.i2p
jrobin: Disable DeallocationHelper for Java 9
This commit is contained in:
@ -127,7 +127,21 @@ public class DeallocationHelper {
|
||||
cleanerCleanMethod.invoke(cleaner);
|
||||
success = true;
|
||||
}
|
||||
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
|
||||
//} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
|
||||
} catch (IllegalAccessException | RuntimeException | InvocationTargetException e) {
|
||||
// Replaced with RuntimeException for OpenJDK 9b181
|
||||
// throws a java.lang.reflect.InaccessibleObjectException extends RuntimeException which is only in Java 9
|
||||
// WARNING: An illegal reflective access operation has occurred
|
||||
// WARNING: Illegal reflective access by engine.misc.DeallocationHelper (file:/path/to/jrobin.jar) to field java.nio.DirectByteBuffer.att
|
||||
// WARNING: Please consider reporting this to the maintainers of engine.misc.DeallocationHelper
|
||||
// WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
|
||||
// WARNING: All illegal access operations will be denied in a future release
|
||||
// Thread terminated unexpectedly: Shutdown task net.i2p.router.web.StatSummarizer$Shutdown
|
||||
// java.lang.reflect.InaccessibleObjectException: Unable to make public void jdk.internal.ref.Cleaner.clean() accessible: module java.base does not "exports jdk.internal.ref" to unnamed module @381353a0
|
||||
// at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:337)
|
||||
// at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:281)
|
||||
// at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198)
|
||||
// at java.base/java.lang.reflect.Method.setAccessible(Method.java:192)
|
||||
logger.warn("The deallocation of a direct NIO buffer has failed", e);
|
||||
} finally {
|
||||
directByteBufferCleanerMethod.setAccessible(directByteBufferCleanerMethodWasAccessible);
|
||||
|
@ -23,6 +23,7 @@ import java.io.IOException;
|
||||
import java.nio.MappedByteBuffer;
|
||||
import java.nio.channels.FileChannel;
|
||||
|
||||
import net.i2p.util.SystemVersion;
|
||||
|
||||
import engine.misc.DeallocationHelper;
|
||||
|
||||
@ -35,7 +36,8 @@ import engine.misc.DeallocationHelper;
|
||||
public class RrdNioBackend extends RrdFileBackend {
|
||||
private final SyncManager m_syncManager;
|
||||
private MappedByteBuffer m_byteBuffer = null;
|
||||
private static final DeallocationHelper _dHelper = new DeallocationHelper();
|
||||
// Too many ominous warnings from Java 9
|
||||
private static final DeallocationHelper _dHelper = SystemVersion.isJava9() ? null : new DeallocationHelper();
|
||||
|
||||
/**
|
||||
* Creates RrdFileBackend object for the given file path, backed by
|
||||
@ -105,7 +107,7 @@ public class RrdNioBackend extends RrdFileBackend {
|
||||
if (!isReadOnly()) {
|
||||
stopSchedule();
|
||||
}
|
||||
if (m_byteBuffer != null) {
|
||||
if (_dHelper != null && m_byteBuffer != null) {
|
||||
_dHelper.deallocate(m_byteBuffer);
|
||||
m_byteBuffer = null;
|
||||
}
|
||||
|
15
history.txt
15
history.txt
@ -1,6 +1,17 @@
|
||||
2018-01-10 zzz
|
||||
* Addressbook: Remove finalizers (ticket #2115)
|
||||
* i2psnark: Fix double-escaping of '&' (ticket #2127)
|
||||
* jrobin: Disable DeallocationHelper for Java 9
|
||||
|
||||
2018-01-09 zzz
|
||||
* SusiMail: Rewrite/fix subject line encoding
|
||||
|
||||
2018-01-06 zzz
|
||||
* i2ptunnel: Escape chars unescaped by browsers (ticket #2130)
|
||||
* i2ptunnel, eepget: Better error message on invalid URLs (ticket #2130)
|
||||
* Console: Show and set burst bandwidth (ticket #2123)
|
||||
* i2ptunnel:
|
||||
- Advanced config in/out tunnels separately
|
||||
- Better error message on invalid URLs (eepget too) (ticket #2130)
|
||||
- Escape chars unescaped by browsers (ticket #2130)
|
||||
|
||||
2018-01-04 zzz
|
||||
* i2psnark: Fix overflow in ratio sorter (ticket #2129)
|
||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 18;
|
||||
public final static long BUILD = 19;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
Reference in New Issue
Block a user