HBASE-17944 - Removed unused JDK version parsing from ClassSize.

Signed-off-by: Sean Busbey <busbey@apache.org>
This commit is contained in:
Colm O hEigeartaigh 2017-04-21 09:16:01 +01:00 committed by Sean Busbey
parent d69a6366f6
commit 439711e0a0
1 changed files with 0 additions and 14 deletions

View File

@ -108,20 +108,6 @@ public class ClassSize {
/** Overhead for CellSkipListSet */
public static final int CELL_SKIPLIST_SET;
/* Are we running on jdk7? */
private static final boolean JDK7;
static {
final String version = System.getProperty("java.version");
// Verify String looks like this: 1.6.0_29
if (version == null || !version.matches("\\d\\.\\d\\..*")) {
throw new RuntimeException("Unexpected version format: " + version);
}
// Convert char to int
int major = (int)(version.charAt(0) - '0');
int minor = (int)(version.charAt(2) - '0');
JDK7 = major == 1 && minor == 7;
}
/**
* MemoryLayout abstracts details about the JVM object layout. Default implementation is used in
* case Unsafe is not available.