Home / Function/ nullParametersShouldBeHandledWithoutBarfing() — netty Function Reference

nullParametersShouldBeHandledWithoutBarfing() — netty Function Reference

Architecture documentation for the nullParametersShouldBeHandledWithoutBarfing() function in MessageFormatterTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  7f33a2ac_43b8_8465_d36f_bc08b59b40f2["nullParametersShouldBeHandledWithoutBarfing()"]
  61b49498_5128_d2ab_e17e_0c346b46695a["MessageFormatterTest"]
  7f33a2ac_43b8_8465_d36f_bc08b59b40f2 -->|defined in| 61b49498_5128_d2ab_e17e_0c346b46695a
  style 7f33a2ac_43b8_8465_d36f_bc08b59b40f2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/test/java/io/netty/util/internal/logging/MessageFormatterTest.java lines 54–79

    @Test
    public void nullParametersShouldBeHandledWithoutBarfing() {
        String result = MessageFormatter.format("Value is {}.", null).getMessage();
        assertEquals("Value is null.", result);

        result = MessageFormatter.format("Val1 is {}, val2 is {}.", null, null).getMessage();
        assertEquals("Val1 is null, val2 is null.", result);

        result = MessageFormatter.format("Val1 is {}, val2 is {}.", 1, null).getMessage();
        assertEquals("Val1 is 1, val2 is null.", result);

        result = MessageFormatter.format("Val1 is {}, val2 is {}.", null, 2).getMessage();
        assertEquals("Val1 is null, val2 is 2.", result);

        result = MessageFormatter.arrayFormat(
                "Val1 is {}, val2 is {}, val3 is {}", new Integer[] { null, null, null }).getMessage();
        assertEquals("Val1 is null, val2 is null, val3 is null", result);

        result = MessageFormatter.arrayFormat(
                "Val1 is {}, val2 is {}, val3 is {}", new Integer[] { null, 2, 3 }).getMessage();
        assertEquals("Val1 is null, val2 is 2, val3 is 3", result);

        result = MessageFormatter.arrayFormat(
                "Val1 is {}, val2 is {}, val3 is {}", new Integer[] { null, null, 3 }).getMessage();
        assertEquals("Val1 is null, val2 is null, val3 is 3", result);
    }

Domain

Subdomains

Frequently Asked Questions

What does nullParametersShouldBeHandledWithoutBarfing() do?
nullParametersShouldBeHandledWithoutBarfing() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/internal/logging/MessageFormatterTest.java.
Where is nullParametersShouldBeHandledWithoutBarfing() defined?
nullParametersShouldBeHandledWithoutBarfing() is defined in common/src/test/java/io/netty/util/internal/logging/MessageFormatterTest.java at line 54.

Analyze Your Own Codebase

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

Try Supermodel Free