RocksJava must compile on JDK7 (#4768)
Summary: Fixes some RocksJava regressions recently introduced, whereby RocksJava would not build on JDK 7. These should have been visible on Travis-CI! Pull Request resolved: https://github.com/facebook/rocksdb/pull/4768 Differential Revision: D13418173 Pulled By: sagar0 fbshipit-source-id: 57bf223188887f84d9e072031af2e0d2c8a69c30
This commit is contained in:
parent
dde3ef1116
commit
d3daa0db8b
@ -54,9 +54,9 @@ public enum MemoryUsageType {
|
||||
* cannot be found
|
||||
*/
|
||||
public static MemoryUsageType getMemoryUsageType(final byte byteIdentifier) {
|
||||
for (final MemoryUsageType MemoryUsageType : MemoryUsageType.values()) {
|
||||
if (MemoryUsageType.getValue() == byteIdentifier) {
|
||||
return MemoryUsageType;
|
||||
for (final MemoryUsageType memoryUsageType : MemoryUsageType.values()) {
|
||||
if (memoryUsageType.getValue() == byteIdentifier) {
|
||||
return memoryUsageType;
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ public enum MemoryUsageType {
|
||||
"Illegal value provided for MemoryUsageType.");
|
||||
}
|
||||
|
||||
private MemoryUsageType(byte value) {
|
||||
MemoryUsageType(byte value) {
|
||||
value_ = value;
|
||||
}
|
||||
|
||||
|
@ -46,13 +46,13 @@ public class MergeTest {
|
||||
}
|
||||
|
||||
private byte[] longToByteArray(long l) {
|
||||
ByteBuffer buf = ByteBuffer.allocate(Long.BYTES);
|
||||
ByteBuffer buf = ByteBuffer.allocate(Long.SIZE / Byte.SIZE);
|
||||
buf.putLong(l);
|
||||
return buf.array();
|
||||
}
|
||||
|
||||
private long longFromByteArray(byte[] a) {
|
||||
ByteBuffer buf = ByteBuffer.allocate(Long.BYTES);
|
||||
ByteBuffer buf = ByteBuffer.allocate(Long.SIZE / Byte.SIZE);
|
||||
buf.put(a);
|
||||
buf.flip();
|
||||
return buf.getLong();
|
||||
|
Loading…
Reference in New Issue
Block a user