Tagged articles
Null Object pattern
13 articles · Page 1 of 1
This article explains why null references cause NullPointerExceptions in Java and presents modern techniques—such as using Optional, fail‑fast checks, builders, records, the Null Object pattern, and utility libraries—to write safer, more expressive backend code.
Builder PatternJavaNull Object pattern
0 likes · 9 min read

This article explains why overusing null‑check statements in Java leads to verbose code, distinguishes cases where null is a valid response versus an error, and offers practical techniques such as assertions, throwing exceptions, returning empty collections, and applying the Null Object pattern to write cleaner backend code.
JavaNull Object patternassertions
0 likes · 9 min read

The article explains why overusing null‑checks in Java leads to cluttered code, distinguishes between valid and invalid null returns, and recommends using assertions, explicit exceptions, empty collections, or the Null Object pattern to write cleaner, safer backend implementations.
ExceptionJavaNull Object pattern
0 likes · 5 min read

This article explains why excessive null‑checking in Java code is problematic, distinguishes when null is a valid response versus an error, and offers practical techniques such as using assertions, throwing exceptions, returning empty collections, and applying the Null Object pattern to write cleaner, safer code.
JavaNull Object patternOptional
0 likes · 7 min read


21CTOOct 8, 2021 · Backend Development
This article explains why excessive null‑checking clutters Java code, distinguishes valid versus invalid null returns, and shows how to replace them with assert statements, exceptions, empty collections, or the Null Object pattern to write cleaner, more reliable backend code.
Best PracticesJavaNULL handling
0 likes · 6 min read

This article examines why excessive null‑checking in Java code creates clutter, distinguishes when null is a valid response versus an error, and offers practical techniques such as asserts, exceptions, empty collections, and the Null Object pattern to write cleaner, safer code.
Best PracticesException HandlingJava
0 likes · 7 min read

This article explains how to distinguish between valid and invalid null returns in Java, recommends using assertions or exceptions for erroneous nulls, suggests returning empty collections or objects, and demonstrates the Null Object pattern with code examples to eliminate repetitive null‑pointer checks.
Best PracticesException HandlingJava
0 likes · 6 min read

This article explains why excessive null‑checking code appears in Java projects, distinguishes valid versus error null values, and offers practical techniques—including asserts, exceptions, empty collections, and the Null Object pattern—to write cleaner, safer backend code.
Best PracticesJavaNull Object pattern
0 likes · 6 min read

This article explains why excessive null‑checking in Java code is problematic, distinguishes valid versus invalid null returns, and presents better alternatives such as assertions, throwing exceptions, returning empty collections or objects, and applying the Null Object pattern with concrete code examples.
Best PracticesException HandlingJava
0 likes · 6 min read

The article explains why excessive null‑checking in Java code is problematic, distinguishes between null as a valid response and as an error, and offers practical techniques such as assertions, throwing exceptions, returning empty collections, and applying the Null Object pattern to write cleaner, safer backend code.
JavaNull Object patternnull check
0 likes · 7 min read

This article examines why excessive null‑checking in Java leads to cluttered code, distinguishes valid versus invalid null returns, and presents practical techniques—including assertions, exceptions, and the Null Object pattern—to reduce or remove unnecessary null checks.
JavaNull Object patternassert
0 likes · 7 min read

The article explains why Java developers often litter code with null‑checks, distinguishes when null is a valid response versus an error, and proposes using assertions, exceptions, empty collections, or the Null Object pattern to write cleaner, safer code.
Best PracticesException HandlingNull Object pattern
0 likes · 7 min read

This article explains why excessive null‑checks cause a "null‑check disaster", introduces the Null Object design pattern and Java 8 Optional as clean alternatives, and showcases the NR Null Object IntelliJ plugin that can generate null‑object scaffolding automatically.
IntelliJ PluginJavaKotlin
0 likes · 10 min read
