Home / Function/ releaseWhenCompositeCumulateThrows() — netty Function Reference

releaseWhenCompositeCumulateThrows() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  17eb27ce_9145_3b5a_53fd_74297b0f0801["releaseWhenCompositeCumulateThrows()"]
  b1c999fe_35fb_8b70_a958_296cffb0616a["ByteToMessageDecoderTest"]
  17eb27ce_9145_3b5a_53fd_74297b0f0801 -->|defined in| b1c999fe_35fb_8b70_a958_296cffb0616a
  096063bb_b707_8164_e6bf_21a354afe7d5["Error()"]
  17eb27ce_9145_3b5a_53fd_74297b0f0801 -->|calls| 096063bb_b707_8164_e6bf_21a354afe7d5
  style 17eb27ce_9145_3b5a_53fd_74297b0f0801 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-base/src/test/java/io/netty/handler/codec/ByteToMessageDecoderTest.java lines 415–438

    @Test
    public void releaseWhenCompositeCumulateThrows() {
        final Error error = new Error();

        ByteBuf cumulation = new CompositeByteBuf(UnpooledByteBufAllocator.DEFAULT, false, 64) {
            @Override
            public CompositeByteBuf addComponent(boolean increaseWriterIndex, ByteBuf buffer) {
                throw error;
            }
            @Override
            public CompositeByteBuf addFlattenedComponents(boolean increaseWriterIndex, ByteBuf buffer) {
                throw error;
            }
        }.writeZero(1);
        ByteBuf in = Unpooled.buffer().writeZero(12);
        try {
            ByteToMessageDecoder.COMPOSITE_CUMULATOR.cumulate(UnpooledByteBufAllocator.DEFAULT, cumulation, in);
            fail();
        } catch (Error expected) {
            assertSame(error, expected);
            assertEquals(0, in.refCnt());
            cumulation.release();
        }
    }

Domain

Subdomains

Calls

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free