forked from I2P_Developers/i2p.i2p
Jrobin: Fix for error in DeallocationHelper on Java version 9-internal
This commit is contained in:
@ -315,11 +315,18 @@ public class DeallocationHelper {
|
|||||||
"java.nio.ByteBufferAsShortBufferL", "java.nio.ByteBufferAsShortBufferRB",
|
"java.nio.ByteBufferAsShortBufferL", "java.nio.ByteBufferAsShortBufferRB",
|
||||||
"java.nio.ByteBufferAsShortBufferRL" };
|
"java.nio.ByteBufferAsShortBufferRL" };
|
||||||
final String[] javaVersionElements = System.getProperty("java.version").split("\\.");
|
final String[] javaVersionElements = System.getProperty("java.version").split("\\.");
|
||||||
final int indexOfEarlyAccessSuffix = javaVersionElements[0].lastIndexOf("-ea");
|
int indexOfEarlyAccessSuffix = javaVersionElements[0].lastIndexOf("-ea");
|
||||||
if (indexOfEarlyAccessSuffix != -1) {
|
if (indexOfEarlyAccessSuffix != -1) {
|
||||||
// drops the "-ea" suffix from the major version number for
|
// drops the "-ea" suffix from the major version number for
|
||||||
// an early access build
|
// an early access build
|
||||||
javaVersionElements[0] = javaVersionElements[0].substring(0, indexOfEarlyAccessSuffix);
|
javaVersionElements[0] = javaVersionElements[0].substring(0, indexOfEarlyAccessSuffix);
|
||||||
|
} else {
|
||||||
|
indexOfEarlyAccessSuffix = javaVersionElements[0].lastIndexOf("-internal");
|
||||||
|
if (indexOfEarlyAccessSuffix != -1) {
|
||||||
|
// drops the "-internal" suffix from the major version number for
|
||||||
|
// an early access build (Ubuntu)
|
||||||
|
javaVersionElements[0] = javaVersionElements[0].substring(0, indexOfEarlyAccessSuffix);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
final int major, minor;
|
final int major, minor;
|
||||||
if (javaVersionElements.length >= 2) {
|
if (javaVersionElements.length >= 2) {
|
||||||
|
@ -174,6 +174,8 @@ class SummaryListener implements RateSummaryListener {
|
|||||||
rrdFile.delete();
|
rrdFile.delete();
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
_log.error("Error starting RRD for stat " + baseName, ioe);
|
_log.error("Error starting RRD for stat " + baseName, ioe);
|
||||||
|
} catch (Throwable t) {
|
||||||
|
_log.error("Error starting RRD for stat " + baseName, t);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user