Home / Function/ comparableInterfaceNotViolated() — netty Function Reference

comparableInterfaceNotViolated() — netty Function Reference

Architecture documentation for the comparableInterfaceNotViolated() function in AbstractByteBufTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  47237f09_8b5a_0893_f468_9864b80cf2c8["comparableInterfaceNotViolated()"]
  6540f2d1_cdad_6705_dd1d_9a24e2e53242["AbstractByteBufTest"]
  47237f09_8b5a_0893_f468_9864b80cf2c8 -->|defined in| 6540f2d1_cdad_6705_dd1d_9a24e2e53242
  style 47237f09_8b5a_0893_f468_9864b80cf2c8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java lines 132–148

    @Test
    public void comparableInterfaceNotViolated() {
        assumeFalse(buffer.isReadOnly());
        buffer.writerIndex(buffer.readerIndex());
        assumeTrue(buffer.writableBytes() >= 4);

        buffer.writeLong(0);
        ByteBuf buffer2 = newBuffer(CAPACITY);
        assumeFalse(buffer2.isReadOnly());
        buffer2.writerIndex(buffer2.readerIndex());
        // Write an unsigned integer that will cause buffer.getUnsignedInt() - buffer2.getUnsignedInt() to underflow the
        // int type and wrap around on the negative side.
        buffer2.writeLong(0xF0000000L);
        assertTrue(buffer.compareTo(buffer2) < 0);
        assertTrue(buffer2.compareTo(buffer) > 0);
        buffer2.release();
    }

Domain

Subdomains

Frequently Asked Questions

What does comparableInterfaceNotViolated() do?
comparableInterfaceNotViolated() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java.
Where is comparableInterfaceNotViolated() defined?
comparableInterfaceNotViolated() is defined in buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java at line 132.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free