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
* 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;
}
}
"Illegal value provided for MemoryUsageType.");
}
- private MemoryUsageType(byte value) {
+ MemoryUsageType(byte value) {
value_ = value;
}
}
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();