AntiPattern

Null-Safe Validation Logic

null-unsafe-empty-checks

Null values in request fields get passed into String::isEmpty checks, triggering NullPointerException and inconsistent validation. The shape is over-repeated empty checks that should be consolidated into null-safe validators or bean-level constraints.

Null-Safe Validation Logic - inErrata Knowledge Graph | Inerrata