Tag

nullpointerexception

0 views collected around this technical thread.

Cognitive Technology Team
Cognitive Technology Team
Jun 17, 2025 · Cloud Computing

What a Single NullPointerException Taught Us About Cloud Reliability

The June 2025 Google Cloud outage, caused by an untested code change that triggered a NullPointerException, crippled over 70 core services worldwide, prompting a rapid technical fix, public apology, and industry‑wide reflections on cloud stability, fault tolerance, and deployment practices.

cloud outagegoogle cloudincident response
0 likes · 7 min read
What a Single NullPointerException Taught Us About Cloud Reliability
Cognitive Technology Team
Cognitive Technology Team
Apr 22, 2025 · Fundamentals

Understanding the Ternary Operator and NullPointerException in Java

This article explains Java's ternary operator syntax, demonstrates how mixing primitive and wrapper types can trigger NullPointerException due to automatic unboxing, and provides code examples and best‑practice notes to help developers avoid such pitfalls.

JavaUnboxingboxing
0 likes · 3 min read
Understanding the Ternary Operator and NullPointerException in Java
JD Tech Talk
JD Tech Talk
Mar 31, 2025 · Backend Development

InheritableThreadLocal and Thread Pool Interaction Leading to Null Pointer Exception

This article analyzes a null pointer exception caused by InheritableThreadLocal and thread pool reuse, explaining how shared threads in a pool can lead to data corruption when parent thread values are not properly managed.

BackendDevelopmentInheritableThreadLocalconcurrency
0 likes · 13 min read
InheritableThreadLocal and Thread Pool Interaction Leading to Null Pointer Exception
IT Services Circle
IT Services Circle
Mar 18, 2025 · Backend Development

Why Debugging a Simple ConcurrentLinkedQueue Triggers a NullPointerException in IntelliJ IDEA

The article recounts a puzzling case where a minimal Java program using ConcurrentLinkedQueue runs fine normally but throws a NullPointerException when debugged in IntelliJ IDEA, explains the underlying cause involving the IDE's automatic toString invocation, and shows how to disable the offending settings.

ConcurrentLinkedQueueIntelliJ IDEAJava
0 likes · 9 min read
Why Debugging a Simple ConcurrentLinkedQueue Triggers a NullPointerException in IntelliJ IDEA
Architect's Guide
Architect's Guide
Feb 24, 2025 · Backend Development

Using Java Optional to Prevent NullPointerException

This article introduces Java 8's Optional class, explains its creation methods and common operations such as get, isPresent, ifPresent, filter, map, flatMap, orElse, orElseGet, orElseThrow, and shows practical usage scenarios and best‑practice recommendations for handling null values in backend code.

Functional ProgrammingJavaJava8
0 likes · 15 min read
Using Java Optional to Prevent NullPointerException
Java Architect Essentials
Java Architect Essentials
Jan 3, 2025 · Backend Development

Using Java 8 Optional to Prevent NullPointerException: Methods, Examples, and Best Practices

This article introduces Java 8's Optional class as a robust solution for avoiding NullPointerException, explains its creation methods, demonstrates common operations such as get, isPresent, ifPresent, filter, map, flatMap, orElse, orElseGet, orElseThrow, and provides practical usage scenarios and cautions for developers.

BestPracticesJavaJava8
0 likes · 16 min read
Using Java 8 Optional to Prevent NullPointerException: Methods, Examples, and Best Practices
macrozheng
macrozheng
Dec 19, 2024 · Backend Development

Master Java Optional: Clean Null Handling with Real-World Examples

This article introduces Java's Optional class, explains why null checks cause clutter, demonstrates how to replace traditional three‑level null‑checking with concise Optional chains, and provides detailed examples of all core Optional methods such as empty, of, ofNullable, isPresent, get, ifPresent, filter, map, flatMap, orElse, orElseGet, and orElseThrow.

JavaJava8Optional
0 likes · 11 min read
Master Java Optional: Clean Null Handling with Real-World Examples
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 29, 2024 · Backend Development

Mastering Java Optional: Prevent NPEs and Write Cleaner Code

This article explores the Java Optional class with practical examples, showing how to avoid NullPointerException, simplify exception handling, provide default values, chain operations, and improve code readability in Spring Boot 3 projects.

JavaOptionalSpring Boot
0 likes · 9 min read
Mastering Java Optional: Prevent NPEs and Write Cleaner Code
DaTaobao Tech
DaTaobao Tech
Aug 23, 2024 · Fundamentals

Common Java Pitfalls and Their Solutions

The article outlines frequent Java pitfalls—including BigDecimal precision loss, immutable lists from Arrays.asList, double division by zero returning Infinity, null values in switch statements, stream filters mutating original objects, and autoboxing nulls causing NullPointerExceptions—and provides clear explanations and practical fixes to enhance code reliability.

Arrays.asListBigDecimalJava
0 likes · 5 min read
Common Java Pitfalls and Their Solutions
macrozheng
macrozheng
Jul 23, 2024 · Fundamentals

Mastering Java Optional: Eliminate NullPointerExceptions with Clean Code

This article explains why NullPointerExceptions occur, introduces Java's Optional as a concise alternative to explicit null checks, demonstrates practical code transformations, and reviews all core Optional methods introduced in JDK 8 to improve readability and safety of Java applications.

CodeCleanlinessJavaJava8
0 likes · 10 min read
Mastering Java Optional: Eliminate NullPointerExceptions with Clean Code
Selected Java Interview Questions
Selected Java Interview Questions
Jul 14, 2024 · Backend Development

Understanding NullPointerException in Java String Switch Statements

The article explains why a NullPointerException occurs when a null String is used in a switch statement, detailing the underlying equals() and hashCode() calls, the required preconditions, and how Java compiles String switches, supplemented with illustrative code examples.

Exception HandlingJavaString Switch
0 likes · 7 min read
Understanding NullPointerException in Java String Switch Statements
Code Ape Tech Column
Code Ape Tech Column
Jul 2, 2024 · Backend Development

How to Use Java Stream toMap with Duplicate Keys and Null Values

This article demonstrates how to convert a list of Java objects into a Map using Stream's toMap collector, addresses duplicate key exceptions by providing a merge function, handles null values with Optional, and compares stream-based solutions with traditional for-loop approaches.

DuplicateKeyJavaOptional
0 likes · 6 min read
How to Use Java Stream toMap with Duplicate Keys and Null Values
JD Tech
JD Tech
Jul 1, 2024 · Backend Development

Resolving NullPointerException in BeanCopier Caused by Lombok @Accessors(chain=true)

This article analyzes a NullPointerException triggered by Lombok's @Accessors(chain=true) when using BeanCopier, explains how the altered setter return type prevents JDK Introspector from recognizing write methods, and provides two practical solutions to fix the issue.

BeanCopierIntrospectorJava
0 likes · 9 min read
Resolving NullPointerException in BeanCopier Caused by Lombok @Accessors(chain=true)
Architecture Digest
Architecture Digest
Jun 23, 2024 · Backend Development

Debugging and Preventing NullPointerException in Java Backend Data Processing

This article presents a real-world Java backend case where null pointer exceptions arise during data matching and batch insertion, analyzes the root causes in each code line, and offers defensive programming, ternary, Optional, collection checks, and utility methods to safely handle null values.

JavaOptionalbackend
0 likes · 5 min read
Debugging and Preventing NullPointerException in Java Backend Data Processing
Java Architect Essentials
Java Architect Essentials
Dec 6, 2023 · Backend Development

Understanding Enhanced NullPointerException in Java 14 (JEP 358)

The article explains how Java 14 introduces enhanced NullPointerException messages via JEP 358, how to enable them with the -XX:+ShowCodeDetailsInExceptionMessages flag, and discusses the technical details, benefits, and potential security considerations of this feature.

Exception HandlingJavaJava14
0 likes · 7 min read
Understanding Enhanced NullPointerException in Java 14 (JEP 358)
Java Architect Essentials
Java Architect Essentials
Nov 1, 2023 · Backend Development

Understanding Java 8 Optional API: Methods, Usage, and Practical Examples

This article explains how Java 8's Optional class helps avoid NullPointerException by providing a fluent API—including ofNullable, empty, orElse, map, flatMap, filter, and other methods—along with concrete code examples that demonstrate refactoring traditional null‑check logic into concise, functional style.

Functional ProgrammingJavaJava8
0 likes · 10 min read
Understanding Java 8 Optional API: Methods, Usage, and Practical Examples
Architect
Architect
Oct 11, 2023 · Backend Development

Understanding and Using Java Optional to Avoid NullPointerException

This article explains the purpose and usage of Java 8's Optional class, demonstrates how to create and manipulate Optional objects, compares its various methods such as get, isPresent, ifPresent, filter, map, flatMap, orElse, orElseGet, orElseThrow, and highlights JDK 9 enhancements and practical best‑practice scenarios.

JavaJava8Optional
0 likes · 15 min read
Understanding and Using Java Optional to Avoid NullPointerException
Architecture Digest
Architecture Digest
Sep 18, 2023 · Backend Development

Using Java 8 Optional to Avoid NullPointerException: API Overview and Practical Examples

This article explains the NullPointerException problem in Java, introduces the Java 8 Optional class, details its constructors and key methods such as of, ofNullable, empty, orElse, orElseGet, orElseThrow, map, flatMap, isPresent, ifPresent, and filter, and provides practical code examples demonstrating more elegant null‑handling.

APIFunctionalProgrammingJava
0 likes · 10 min read
Using Java 8 Optional to Avoid NullPointerException: API Overview and Practical Examples
Architect's Guide
Architect's Guide
Sep 12, 2023 · Backend Development

Using Java 8 Optional API to Eliminate NullPointerException

This article explains how Java 8's Optional class and its methods—of, ofNullable, empty, orElse, orElseGet, orElseThrow, map, flatMap, isPresent, ifPresent, and filter—can replace verbose null‑checks, making code more concise and safer while providing concrete examples and source code.

APIFunctional ProgrammingJava
0 likes · 10 min read
Using Java 8 Optional API to Eliminate NullPointerException
转转QA
转转QA
Aug 31, 2023 · Backend Development

Resolving a NullPointerException Caused by In‑Place Modification of Apollo Configuration

The article recounts a production incident where a new backend feature introduced a NullPointerException due to directly mutating an Apollo configuration object, describes the debugging steps taken—including log analysis, environment replication, service restart, and code review—and explains the final fix of returning a copy of the configuration to prevent shared‑state corruption.

ApolloCode ReviewJava
0 likes · 8 min read
Resolving a NullPointerException Caused by In‑Place Modification of Apollo Configuration