Home / Function/ releaseWhenMergeCumulateThrows() — netty Function Reference

releaseWhenMergeCumulateThrows() — netty Function Reference

Architecture documentation for the releaseWhenMergeCumulateThrows() function in ByteToMessageDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  6a28e0fb_aec6_2f62_7b71_236b844d955b["releaseWhenMergeCumulateThrows()"]
  b1c999fe_35fb_8b70_a958_296cffb0616a["ByteToMessageDecoderTest"]
  6a28e0fb_aec6_2f62_7b71_236b844d955b -->|defined in| b1c999fe_35fb_8b70_a958_296cffb0616a
  707c517b_e271_bef6_22f5_a792b0b4256a["WriteFailingByteBuf()"]
  6a28e0fb_aec6_2f62_7b71_236b844d955b -->|calls| 707c517b_e271_bef6_22f5_a792b0b4256a
  style 6a28e0fb_aec6_2f62_7b71_236b844d955b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-base/src/test/java/io/netty/handler/codec/ByteToMessageDecoderTest.java lines 345–362

    @Test
    public void releaseWhenMergeCumulateThrows() {
        WriteFailingByteBuf oldCumulation = new WriteFailingByteBuf(1, 64);
        oldCumulation.writeZero(1);
        ByteBuf in = Unpooled.buffer().writeZero(12);

        Throwable thrown = null;
        try {
            ByteToMessageDecoder.MERGE_CUMULATOR.cumulate(UnpooledByteBufAllocator.DEFAULT, oldCumulation, in);
        } catch (Throwable t) {
            thrown = t;
        }

        assertSame(oldCumulation.writeError(), thrown);
        assertEquals(0, in.refCnt());
        assertEquals(1, oldCumulation.refCnt());
        oldCumulation.release();
    }

Domain

Subdomains

Frequently Asked Questions

What does releaseWhenMergeCumulateThrows() do?
releaseWhenMergeCumulateThrows() is a function in the netty codebase, defined in codec-base/src/test/java/io/netty/handler/codec/ByteToMessageDecoderTest.java.
Where is releaseWhenMergeCumulateThrows() defined?
releaseWhenMergeCumulateThrows() is defined in codec-base/src/test/java/io/netty/handler/codec/ByteToMessageDecoderTest.java at line 345.
What does releaseWhenMergeCumulateThrows() call?
releaseWhenMergeCumulateThrows() calls 1 function(s): WriteFailingByteBuf.

Analyze Your Own Codebase

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

Try Supermodel Free