Tagged articles
28 articles
Page 1 of 1
macrozheng
macrozheng
Jan 5, 2026 · Backend Development

Why @NotEmpty Misses Blank Strings and How @NotBlank Fixes It

The article explains why using @NotEmpty fails to detect blank strings, demonstrates the issue with a simple demo, shows the correct use of StringUtils.isBlank, and clarifies the differences between @NotNull, @NotEmpty, and @NotBlank annotations in Java validation.

JavaStringUtilsspring
0 likes · 4 min read
Why @NotEmpty Misses Blank Strings and How @NotBlank Fixes It
Top Architect
Top Architect
Dec 20, 2025 · Backend Development

Master Null Checks in Java: When to Use StringUtils, ObjectUtils, and CollectionUtils

This article explains how to replace repetitive null‑checks in Java with the appropriate utility classes—StringUtils for strings, ObjectUtils for objects, arrays, lists and maps, and CollectionUtils for collections—providing step‑by‑step guidance, code examples, and a discussion of each method's limitations.

BestPracticesCollectionUtilsJava
0 likes · 8 min read
Master Null Checks in Java: When to Use StringUtils, ObjectUtils, and CollectionUtils
Java Tech Enthusiast
Java Tech Enthusiast
Nov 2, 2025 · Backend Development

Master Elegant Null Checks in Java with StringUtils and ObjectUtils

This article explains how to replace repetitive !=null checks in Java with concise, type‑aware utility methods such as StringUtils, ObjectUtils, Collections, and CollectionUtils, providing code examples and discussing the underlying implementations and their limitations for different data types.

BestPracticesJavaObjectUtils
0 likes · 8 min read
Master Elegant Null Checks in Java with StringUtils and ObjectUtils
macrozheng
macrozheng
Sep 17, 2025 · Backend Development

Master Elegant Null Checks in Java with StringUtils and ObjectUtils

This article explains how to replace repetitive !=null checks with efficient, type‑specific utility methods like StringUtils and ObjectUtils, offering a three‑step approach, code examples, and insights into their implementations for robust null handling in Java applications.

BackendObjectUtilsStringUtils
0 likes · 8 min read
Master Elegant Null Checks in Java with StringUtils and ObjectUtils
Java Architect Essentials
Java Architect Essentials
Sep 1, 2025 · Backend Development

Quick Null Checks in Java with StringUtils, ObjectUtils, CollectionUtils

This article explains how to replace repetitive !=null checks in Java by identifying the data type and using the appropriate utility classes—StringUtils for strings, ObjectUtils for objects, and CollectionUtils for collections—to perform concise and reliable null or empty evaluations, including code examples and discussion of edge cases.

CollectionUtilsJavaObjectUtils
0 likes · 8 min read
Quick Null Checks in Java with StringUtils, ObjectUtils, CollectionUtils
Top Architecture Tech Stack
Top Architecture Tech Stack
Apr 11, 2025 · Backend Development

Understanding Apache Commons Lang StringUtils: isEmpty, isBlank and Related Utility Methods

This article explains the differences between the various Apache Commons Lang StringUtils methods such as isEmpty, isNotEmpty, isAnyEmpty, isNoneEmpty, isBlank, isNotBlank, isAnyBlank, and isNoneBlank, provides example code snippets, and points to official documentation for deeper reference.

Apache Commons LangBackend DevelopmentJava
0 likes · 7 min read
Understanding Apache Commons Lang StringUtils: isEmpty, isBlank and Related Utility Methods
Java Captain
Java Captain
Feb 14, 2025 · Fundamentals

Understanding Apache Commons StringUtils: isEmpty, isBlank, and Related Methods

This article explains the differences and usage of Apache Commons Lang3 StringUtils methods such as isEmpty, isNotEmpty, isAnyEmpty, isNoneEmpty, isBlank, isNotBlank, isAnyBlank, and isNoneBlank, providing code examples and behavioral details for handling null, empty, and whitespace strings in Java.

Apache CommonsJavaStringUtils
0 likes · 6 min read
Understanding Apache Commons StringUtils: isEmpty, isBlank, and Related Methods
macrozheng
macrozheng
Jan 20, 2025 · Fundamentals

Master Elegant Null Checks in Java with Utility Classes

This article explains how to replace repetitive !=null checks in Java by identifying data types and using the appropriate Spring/Apache utility classes such as StringUtils, ObjectUtils, Collections, and CollectionUtils, providing code examples and best‑practice guidelines.

ObjectUtilsStringUtilscoding best practices
0 likes · 8 min read
Master Elegant Null Checks in Java with Utility Classes
Open Source Linux
Open Source Linux
Jan 7, 2025 · Fundamentals

Master Elegant Null Checks in Java with StringUtils and ObjectUtils

This guide explains how to efficiently and elegantly handle null pointer checks in Java by identifying data types, selecting the right utility classes such as StringUtils, ObjectUtils, Arrays, Collections, and applying their isEmpty methods to reduce repetitive code.

JavaObjectUtilsStringUtils
0 likes · 7 min read
Master Elegant Null Checks in Java with StringUtils and ObjectUtils
Selected Java Interview Questions
Selected Java Interview Questions
Dec 17, 2024 · Backend Development

Efficient and Elegant Null Checks in Java Using Utility Classes

This article explains how to perform efficient and elegant null checks in Java by first identifying the data type, then selecting the appropriate utility class such as StringUtils, ObjectUtils, Collections or CollectionUtils, and finally applying the class’s isEmpty method with code examples for strings, arrays, lists, maps, and more.

Backend DevelopmentJavaObjectUtils
0 likes · 7 min read
Efficient and Elegant Null Checks in Java Using Utility Classes
Architecture Digest
Architecture Digest
Dec 9, 2024 · Fundamentals

Efficient Null Checks in Java Using Utility Classes

This article explains how to efficiently perform null checks in Java by selecting appropriate utility classes such as StringUtils, ObjectUtils, Collections, and CollectionUtils for different data types, and also includes a brief notice about a free programmer book giveaway.

CollectionsJavaObjectUtils
0 likes · 9 min read
Efficient Null Checks in Java Using Utility Classes
macrozheng
macrozheng
Sep 13, 2024 · Backend Development

Mastering Apache Commons StringUtils: When to Use isEmpty, isBlank, and More

This article explains the differences among Apache Commons Lang's StringUtils methods—such as isEmpty, isBlank, isNotEmpty, isAnyEmpty, isNoneEmpty, and their variants—providing code examples, usage guidelines, and practical tips for Java developers to avoid common pitfalls when handling empty or blank strings.

Apache CommonsJavaStringUtils
0 likes · 7 min read
Mastering Apache Commons StringUtils: When to Use isEmpty, isBlank, and More
Selected Java Interview Questions
Selected Java Interview Questions
Dec 6, 2022 · Backend Development

Understanding Apache Commons Lang StringUtils isEmpty/isBlank Methods in Java

This article explains the various Apache Commons Lang StringUtils methods such as isEmpty, isNotEmpty, isAnyEmpty, isNoneEmpty, isBlank, isNotBlank, isAnyBlank, and isNoneBlank, providing usage examples, code snippets, and detailed behavior for handling null, empty, and whitespace strings in Java.

Apache Commons LangBackend DevelopmentJava
0 likes · 7 min read
Understanding Apache Commons Lang StringUtils isEmpty/isBlank Methods in Java
Programmer DD
Programmer DD
Jun 28, 2022 · Fundamentals

Mastering Apache Commons Lang StringUtils: Empty, Blank, and Their Variants

This article explains the Apache Commons Lang StringUtils utility class, detailing the behavior of isEmpty, isNotEmpty, isAnyEmpty, isNoneEmpty, isBlank, isNotBlank, isAnyBlank, and isNoneBlank methods with examples and source code, helping Java developers choose the right check for null, empty, or whitespace strings.

Apache CommonsBlank CheckEmpty Check
0 likes · 8 min read
Mastering Apache Commons Lang StringUtils: Empty, Blank, and Their Variants
Java Captain
Java Captain
Feb 28, 2021 · Backend Development

Popular Java Utility Classes and Their Most Frequently Used Methods

This article presents a ranked list of the most popular Java utility classes and their top methods, derived from analysis of 50,000 open‑source Java projects, helping developers discover ready‑made functionality and avoid reinventing common code.

Apache CommonsFileUtilsIOUtils
0 likes · 5 min read
Popular Java Utility Classes and Their Most Frequently Used Methods
Programmer DD
Programmer DD
Nov 9, 2020 · Backend Development

When to Use StringUtils.isEmpty vs isBlank in Java?

This article explains the differences between Apache Commons Lang's StringUtils.isEmpty, isBlank, and their complementary methods, shows their source implementations, and offers a recommendation to prefer isBlank for more comprehensive null and whitespace checks.

Apache CommonsJavaStringUtils
0 likes · 3 min read
When to Use StringUtils.isEmpty vs isBlank in Java?
macrozheng
macrozheng
May 15, 2020 · Backend Development

Boost Your Java Code with Essential Apache Commons & Guava Utilities

This article introduces a collection of practical Java utility classes—from Apache Commons StringUtils and DateUtils to Guava's Joiner and Stopwatch—showing how to simplify string handling, date conversion, collection checks, file I/O, and performance timing with concise code examples.

Apache CommonsDateUtilsGuava
0 likes · 16 min read
Boost Your Java Code with Essential Apache Commons & Guava Utilities