Tag

JSR305

1 views collected around this technical thread.

Selected Java Interview Questions
Selected Java Interview Questions
Feb 17, 2021 · Backend Development

Handling Null Values in Java: Empty Collections, Optional, and Null‑Object Pattern

This article explains common null‑handling pitfalls in Java backend code, demonstrates why returning empty collections or Optional is safer than null, shows how to use JSR‑303/JSR‑305 annotations and the Null‑Object pattern, and provides practical guidelines for method signatures and bean getters.

BackendJSR303JSR305
0 likes · 14 min read
Handling Null Values in Java: Empty Collections, Optional, and Null‑Object Pattern
Selected Java Interview Questions
Selected Java Interview Questions
Dec 22, 2020 · Backend Development

Handling Null Values and Optional in Java Backend Development

This article discusses common null‑value pitfalls in Java services, compares returning null collections versus empty collections, introduces the Null‑Object pattern and JDK 8/Guava Optional, and provides practical guidelines using JSR‑303/JSR‑305 annotations to make APIs safer and more expressive.

BackendJSR303JSR305
0 likes · 15 min read
Handling Null Values and Optional in Java Backend Development