@Test(expected = IllegalArgumentException.class) public void releaseHeapBuffer() { Unsafe9R.invokeCleaner(ByteBuffer.allocate(1)); }
public static void invokeCleaner(ByteBuffer directBuffer) { if (!directBuffer.isDirect()) throw new IllegalArgumentException("buffer is non-direct"); if (useJava9) Java9.invokeCleaner(directBuffer); else { Java6.invokeCleaner(directBuffer); } }
Unsafe9R { public static void invokeCleaner(ByteBuffer directBuffer) { if (!directBuffer.isDirect()) throw new IllegalArgumentException("buffer is non-direct"); if (useJava9) Java9.invokeCleaner(directBuffer); else { Java6.invokeCleaner(directBuffer); } } }
Unsafe9R { public static void invokeCleaner(ByteBuffer directBuffer) { if (!directBuffer.isDirect()) throw new IllegalArgumentException("buffer is non-direct"); if (useJava9) Java9.invokeCleaner(directBuffer); else { Java6.invokeCleaner(directBuffer); } }  }
Unsafe9R { public static void invokeCleaner(ByteBuffer directBuffer) { if (!directBuffer.isDirect()) throw new IllegalArgumentException("buffer is non-direct"); if (useJava9) Java9.invokeCleaner(directBuffer); else { Java6.invokeCleaner(directBuffer); } }  static void invokeCleaner(ByteBuffer directBuffer); }
Unsafe9R { public static void invokeCleaner(ByteBuffer directBuffer) { if (!directBuffer.isDirect()) throw new IllegalArgumentException("buffer is non-direct"); if (useJava9) Java9.invokeCleaner(directBuffer); else { Java6.invokeCleaner(directBuffer); } }  static void invokeCleaner(ByteBuffer directBuffer);  }