Tagged articles
8 articles
Page 1 of 1
macrozheng
macrozheng
Jul 16, 2025 · Backend Development

Debugging NPEs in Spring Boot: Real‑World Case Study and Fixes

A junior Java developer encounters a NullPointerException while integrating third‑party data into a Spring Boot backend, and the article walks through reproducing the bug, analyzing each faulty line, and presenting defensive‑programming, ternary, Optional, and utility‑class solutions plus a SonarLint recommendation.

DebuggingNPEdefensive programming
0 likes · 6 min read
Debugging NPEs in Spring Boot: Real‑World Case Study and Fixes
Xianyu Technology
Xianyu Technology
Jan 18, 2023 · Backend Development

Java Ternary Operator NPE, Message Storm, and Network Latency Cases

The article uses a safety‑principle analogy to introduce three real‑world backend incidents—a Java ternary‑operator NullPointerException caused by unintended unboxing, a RocketMQ message‑storm triggered by swapped parameters, and a network‑path latency spike—showing how language semantics, messaging contracts, and infrastructure topology each can create production bugs.

DistributedSystemsJavaNPE
0 likes · 10 min read
Java Ternary Operator NPE, Message Storm, and Network Latency Cases
dbaplus Community
dbaplus Community
Dec 5, 2022 · Backend Development

Why a Simple Log Caused FastJSON NPE: Inside JavaBeanSerializer Mechanics

The article recounts a production incident where adding a single log line caused a FastJSON NullPointerException, then reconstructs the scenario, analyzes the JavaBeanSerializer source code, presents serialization flowcharts, demonstrates example code with various @JSONField and @JSONType cases, and proposes coding standards to avoid similar serialization pitfalls.

JSONFieldJava serializationJavaBeanSerializer
0 likes · 9 min read
Why a Simple Log Caused FastJSON NPE: Inside JavaBeanSerializer Mechanics
Java Backend Technology
Java Backend Technology
Sep 15, 2022 · Backend Development

How to Prevent NPEs in Java: Defensive Coding Tips for New Developers

This article walks through a real‑world NPE incident in a Java SpringBoot service, demonstrates how four lines of code can cause three null‑pointer exceptions, and provides practical defensive‑programming solutions such as early returns, ternary checks, Optional, and utility methods to eliminate these bugs.

JavaNPESpringBoot
0 likes · 6 min read
How to Prevent NPEs in Java: Defensive Coding Tips for New Developers
Programmer DD
Programmer DD
Sep 14, 2022 · Backend Development

How to Prevent Java NPEs: Real‑World Debugging and Defensive Coding Tips

This article walks through a real production NPE incident in a Java backend, reproduces the faulty code, analyzes each null‑pointer cause, and presents defensive programming, ternary, Optional, and utility‑library solutions while recommending SonarLint for automatic detection.

JavaNPEdefensive programming
0 likes · 6 min read
How to Prevent Java NPEs: Real‑World Debugging and Defensive Coding Tips
Su San Talks Tech
Su San Talks Tech
Jun 19, 2021 · Backend Development

How a Hidden NPE Revealed Deep Issues in Our Java Backend and RocketMQ Integration

After receiving a Sentry alert for a NullPointerException in a Java backend, the author traced the issue through user context handling with TransmittableThreadLocal, uncovered mismatched RocketMQ header propagation, multiple retry attempts, and a manual message injection, ultimately revealing how a missing header caused the NPE.

BackendNPERocketMQ
0 likes · 18 min read
How a Hidden NPE Revealed Deep Issues in Our Java Backend and RocketMQ Integration
Java Captain
Java Captain
Dec 10, 2017 · Backend Development

Common Java Development Pitfalls: NPE, Collections, and Best Practices

This article discusses why hiring top engineers matters, reviews the Alibaba Java Development Manual, and details common Java pitfalls such as NullPointerExceptions, improper use of equals, map null handling, and collection operations, offering practical solutions and best‑practice recommendations for backend developers.

Backend DevelopmentNPE
0 likes · 9 min read
Common Java Development Pitfalls: NPE, Collections, and Best Practices