GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove the test of a heap AdaptiveByteBuf's memory address · netty/netty@bc01fbc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • buffer/src/test/java/io/netty/buffer
    • AdaptiveByteBufAllocatorTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎buffer/src/test/java/io/netty/buffer/AdaptiveByteBufAllocatorTest.java‎

Copy file name to clipboardExpand all lines: buffer/src/test/java/io/netty/buffer/AdaptiveByteBufAllocatorTest.java
-19Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -108,25 +108,6 @@ public void testDirectBufferMemoryAddressFollowsItsSegment() {
108108
assertEquals(0L, unwrappedSecond._memoryAddress());
109109
}
110110

111-
@Test
112-
public void testHeapBufferMemoryAddressIsZero() {
113-
AdaptiveByteBufAllocator allocator = newAllocator(false);
114-
// A heap buffer has no memory address. It used to return its offset in the chunk instead of 0, which the
115-
// second buffer shows if it's at an offset above zero, as it likely is.
116-
ByteBuf first = allocator.heapBuffer(16, 1 << 20);
117-
ByteBuf second = allocator.heapBuffer(16, 1 << 20);
118-
try {
119-
for (ByteBuf buf : new ByteBuf[] { first, second }) {
120-
assertFalse(buf.hasMemoryAddress());
121-
assertEquals(0L, buf.memoryAddress());
122-
assertEquals(0L, unwrapToAbstractByteBuf(buf)._memoryAddress());
123-
}
124-
} finally {
125-
first.release();
126-
second.release();
127-
}
128-
}
129-
130111
// The NIO buffer's address is computed from the chunk's buffer separately from memoryAddress(), and comparing the
131112
// addresses avoids reading memory through a wrong one.
132113
private static void assertMemoryAddressMatchesTheNioBuffer(ByteBuf buf) {

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.