Home / Function/ ensureWritableWithNotEnoughSpaceShouldThrow() — netty Function Reference

ensureWritableWithNotEnoughSpaceShouldThrow() — netty Function Reference

Architecture documentation for the ensureWritableWithNotEnoughSpaceShouldThrow() function in SlicedByteBufTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  07feffba_390b_0c1c_3367_0a28d3df330d["ensureWritableWithNotEnoughSpaceShouldThrow()"]
  d2003ad7_9c00_dcea_c98f_30ea8ee049f1["SlicedByteBufTest"]
  07feffba_390b_0c1c_3367_0a28d3df330d -->|defined in| d2003ad7_9c00_dcea_c98f_30ea8ee049f1
  style 07feffba_390b_0c1c_3367_0a28d3df330d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/SlicedByteBufTest.java lines 339–354

    @Test
    public void ensureWritableWithNotEnoughSpaceShouldThrow() {
        final ByteBuf slice = newBuffer(10);
        ByteBuf unwrapped = slice.unwrap();
        unwrapped.writerIndex(unwrapped.writerIndex() + 5);
        try {
            assertThrows(IndexOutOfBoundsException.class, new Executable() {
                @Override
                public void execute() {
                    slice.ensureWritable(1);
                }
            });
        } finally {
            slice.release();
        }
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free