Tagged articles
34 articles
Page 1 of 1
ITPUB
ITPUB
Apr 6, 2026 · Backend Development

Why the String "null" Breaks Your Java Backend and How to Fix It

The article explains how treating the literal string "null" as an empty value can cause serious bugs in Java backend registration, database storage, and security checks, and provides concrete code examples and a sanitisation utility to prevent these issues.

Backendinput validationnull handling
0 likes · 7 min read
Why the String "null" Breaks Your Java Backend and How to Fix It
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 23, 2026 · Backend Development

8 Essential Null‑Handling Rules for Spring Boot 3 to Prevent NPEs

This article presents eight concrete rules for handling null values in Spring Boot 3 applications, illustrating common pitfalls with code snippets, explaining production‑impact risks, and offering best‑practice solutions such as using empty collections, explicit null checks, proper Optional usage, and consistent API design.

CollectionsJavaNPE prevention
0 likes · 11 min read
8 Essential Null‑Handling Rules for Spring Boot 3 to Prevent NPEs
macrozheng
macrozheng
Jun 6, 2025 · Backend Development

Why “null” Strings Break Your Java Backend – and How to Fix It

The article explains how treating the literal string "null" as an empty value can cause serious bugs in Java backend registration, demonstrates the issue with code examples, and provides practical input‑sanitizing and validation techniques to prevent such errors and related security risks.

input validationnull handling
0 likes · 7 min read
Why “null” Strings Break Your Java Backend – and How to Fix It
Su San Talks Tech
Su San Talks Tech
Sep 13, 2023 · Backend Development

Mastering Java Optional: When to Use It and How It Works Under the Hood

This article explores Java's Optional class, explaining its intended purpose, proper usage patterns, common pitfalls, performance considerations, and detailed source code analysis, while comparing it to traditional null checks and demonstrating how methods like map, orElseThrow, and orElseGet behave in practice.

Javafunctional programmingnull handling
0 likes · 10 min read
Mastering Java Optional: When to Use It and How It Works Under the Hood
Java High-Performance Architecture
Java High-Performance Architecture
Feb 20, 2023 · Backend Development

Why Objects.equals Beats a.equals in Java: Null Safety and Source Code Explained

This article explains how Java's Objects.equals differs from the traditional a.equals(b) method, covering null and empty‑string scenarios, demonstrating safe comparisons without NullPointerExceptions, and includes a concise analysis of the underlying source code and the distinction between a==b and a.equals(b).

JavaObjects.equalsequality
0 likes · 5 min read
Why Objects.equals Beats a.equals in Java: Null Safety and Source Code Explained
Selected Java Interview Questions
Selected Java Interview Questions
Nov 1, 2022 · Databases

Understanding MySQL Unique Index Pitfalls and Practical Solutions

This article examines why a MySQL InnoDB table with a unique index can still store duplicate rows—especially when indexed columns contain NULL values or when logical deletion is used—and presents several practical strategies such as adjusting delete status, adding timestamp or auxiliary ID fields, using hash columns, and leveraging proper bulk‑insert techniques to enforce uniqueness effectively.

Database designHashLogical Delete
0 likes · 13 min read
Understanding MySQL Unique Index Pitfalls and Practical Solutions
Java Backend Technology
Java Backend Technology
Oct 22, 2022 · Databases

Why MySQL Unique Indexes Fail with NULL and How to Fix Them

This article explains why a unique index in MySQL can still allow duplicate rows when indexed columns contain NULL, explores the challenges of adding unique indexes to logically deleted tables, and presents practical solutions such as incremental delete status, timestamps, extra IDs, hash fields, and proper batch insertion techniques.

Database designLogical DeleteUnique Index
0 likes · 13 min read
Why MySQL Unique Indexes Fail with NULL and How to Fix Them
dbaplus Community
dbaplus Community
Oct 3, 2022 · Databases

Why MySQL Unique Indexes Still Allow Duplicates and How to Fix Them

This article explains why a MySQL InnoDB table with a unique index can still contain duplicate rows—especially when indexed columns contain NULL values or when logical deletion is used—and presents several practical strategies, including schema changes and alternative locking mechanisms, to enforce true uniqueness.

Database designLogical DeleteUnique Index
0 likes · 13 min read
Why MySQL Unique Indexes Still Allow Duplicates and How to Fix Them
macrozheng
macrozheng
Aug 16, 2022 · Databases

Why MySQL Unique Indexes Still Allow Duplicates and How to Fix Them

This article explores a common MySQL InnoDB pitfall where unique indexes fail to prevent duplicate rows, explains how NULL values and logical deletion affect uniqueness, and presents practical strategies—including composite keys, delete status counters, timestamps, hash fields, and Redis locks—to enforce true uniqueness.

Database designLogical DeleteUnique Index
0 likes · 14 min read
Why MySQL Unique Indexes Still Allow Duplicates and How to Fix Them
ITPUB
ITPUB
Aug 7, 2022 · Databases

Why MySQL Unique Indexes Still Let Duplicates Slip Through and How to Prevent Them

This article examines a MySQL InnoDB pitfall where a unique index fails to block duplicate rows—especially when indexed columns contain NULL values or when logical deletion is used—and presents practical solutions such as adjusting index columns, adding timestamps, delete status counters, hash fields, and proper bulk‑insert strategies.

Logical Deletemysqlnull handling
0 likes · 13 min read
Why MySQL Unique Indexes Still Let Duplicates Slip Through and How to Prevent Them
Su San Talks Tech
Su San Talks Tech
Aug 4, 2022 · Databases

Why MySQL Unique Indexes Still Allow Duplicates and How to Fix Them

This article explains why a unique index on a MySQL InnoDB table may still permit duplicate rows, especially when indexed columns contain NULL values or when logical deletion is used, and presents practical solutions such as adjusting index fields, adding timestamps, hash columns, or redesigning delete logic.

Logical DeleteUnique Indexmysql
0 likes · 14 min read
Why MySQL Unique Indexes Still Allow Duplicates and How to Fix Them
dbaplus Community
dbaplus Community
Mar 7, 2022 · Databases

How to Prevent Null, Type, and Charset Pitfalls in Oracle‑to‑ADB Data Sync

This article details the common pitfalls encountered when synchronizing Oracle databases to AnalyticDB PostgreSQL, covering null versus empty string handling, data type conversion challenges, character set issues, special character processing, and comprehensive testing strategies to ensure data consistency and performance.

AnalyticDBData MigrationOracle
0 likes · 17 min read
How to Prevent Null, Type, and Charset Pitfalls in Oracle‑to‑ADB Data Sync
Top Architect
Top Architect
Nov 15, 2021 · Fundamentals

Understanding toString(), String.valueOf(), and Type Casting in Java

This article explains the differences between toString() and String.valueOf() in Java, demonstrates how basic and wrapper types handle string conversion, discusses null‑value pitfalls, and provides source code analysis to guide developers on safe type casting and avoid common runtime exceptions.

Javafundamentalsnull handling
0 likes · 4 min read
Understanding toString(), String.valueOf(), and Type Casting in Java
21CTO
21CTO
Oct 8, 2021 · Backend Development

How to Eliminate Null Checks in Java: Use Null Object Pattern and Best Practices

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.

AssertJavaNull Object pattern
0 likes · 6 min read
How to Eliminate Null Checks in Java: Use Null Object Pattern and Best Practices
Programmer DD
Programmer DD
Jul 25, 2021 · Backend Development

Mastering Java Optional: Best Practices and Common Pitfalls

This article explains how Java's Optional can replace null checks, outlines common misuse patterns, and provides practical guidelines and code examples for using Optional safely and effectively in backend development.

Code ExamplesJavabest practices
0 likes · 12 min read
Mastering Java Optional: Best Practices and Common Pitfalls
Selected Java Interview Questions
Selected Java Interview Questions
Apr 14, 2021 · Backend Development

Avoiding Null Checks in Java: When to Use Assertions, Exceptions, and the Null Object Pattern

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.

Exception HandlingJavaNull Object pattern
0 likes · 6 min read
Avoiding Null Checks in Java: When to Use Assertions, Exceptions, and the Null Object Pattern
FunTester
FunTester
Apr 12, 2020 · Fundamentals

Why Groovy’s null behaves differently from Java’s null – A deep dive

This article compares Java’s null, which throws NullPointerException on member access, with Groovy’s NullObject that safely handles method calls, explains the underlying implementation, demonstrates practical code examples, and shows how to customize NullObject behavior via metaClass extensions.

GroovyJavaNullObject
0 likes · 4 min read
Why Groovy’s null behaves differently from Java’s null – A deep dive
Java Captain
Java Captain
Dec 25, 2019 · Backend Development

Handling Null Values and Optional in Java: Best Practices and Design Patterns

This article discusses common null‑value pitfalls in Java services, explains why returning null collections is dangerous, and presents robust solutions such as returning empty lists, using Optional, applying JSR‑303/JSR‑305 annotations, and employing the Null Object pattern to improve code safety and readability.

Design PatternsJSR-303JSR-305
0 likes · 13 min read
Handling Null Values and Optional in Java: Best Practices and Design Patterns
Java Backend Technology
Java Backend Technology
Dec 18, 2019 · Backend Development

Mastering Null Handling in Java: Optional, Null Object Pattern & JSR 303/305

This article examines common pitfalls of null values in Java backend code, explains why returning null collections or objects can cause NullPointerExceptions, and presents robust solutions such as returning empty collections, using Optional, applying JSR‑303 validation, JSR‑305 annotations, and the Null Object pattern to improve API safety and readability.

JSR-303JSR-305Java
0 likes · 13 min read
Mastering Null Handling in Java: Optional, Null Object Pattern & JSR 303/305
FunTester
FunTester
Aug 25, 2019 · Backend Development

Why HttpClient Skips Null Parameters and How to Fix It in Java

When using HttpClient for API testing, a JSONObject omits fields with null values, causing version parameters to be missing; initializing version strings to empty strings resolves the issue and ensures proper request payloads.

API testingHttpClientJava
0 likes · 5 min read
Why HttpClient Skips Null Parameters and How to Fix It in Java
Java Captain
Java Captain
Dec 25, 2017 · Fundamentals

Why Printing a null Object in Java Does Not Throw an Exception

This article explores Java's handling of null references when printed or concatenated, showing how PrintStream.print and StringBuilder.append convert null values to the literal string "null" without raising exceptions, and walks through the underlying source code and bytecode.

JDK sourcePrintStreamnull handling
0 likes · 7 min read
Why Printing a null Object in Java Does Not Throw an Exception
ITPUB
ITPUB
Jul 25, 2016 · Databases

How BRIN Indexes Use allnulls and hasnulls to Slash PostgreSQL Scans

This article demonstrates how PostgreSQL 9.5's BRIN index leverages the allnulls and hasnulls flags in its regular pages to filter out unnecessary heap page scans, dramatically improving query performance while also discussing the impact of MVCC bloat and maintenance.

BRINMVCCPostgreSQL
0 likes · 10 min read
How BRIN Indexes Use allnulls and hasnulls to Slash PostgreSQL Scans
ITPUB
ITPUB
Mar 23, 2016 · Databases

Mastering COALESCE in PostgreSQL: Fix NULL Arithmetic Results

This guide shows how NULL values break numeric calculations in PostgreSQL and demonstrates using the COALESCE function to substitute default numbers, with step‑by‑step SQL examples that turn unexpected NULL results into accurate sums.

COALESCEPostgreSQLSQL
0 likes · 4 min read
Mastering COALESCE in PostgreSQL: Fix NULL Arithmetic Results