List of usage examples for io.netty.buffer EmptyByteBuf hasMemoryAddress
@Override public boolean hasMemoryAddress()
From source file:io.netty.buffer.EmptyByteBufTest.java
License:Apache License
@Test public void testMemoryAddress() { EmptyByteBuf empty = new EmptyByteBuf(UnpooledByteBufAllocator.DEFAULT); if (empty.hasMemoryAddress()) { assertThat(empty.memoryAddress(), is(not(0L))); } else {/*from w w w . ja v a 2 s . c o m*/ try { empty.memoryAddress(); fail(); } catch (UnsupportedOperationException ignored) { // Ignore. } } }