Skip to content
Back to skills

Java Refactoring With Spring Objectutils

ASecurity

Refactor Java code to use org.springframework.util.ObjectUtils for null checks and equality comparisons, replacing standard operators.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentsjavaspringrefactoringapi

Works with

  • api

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill java-refactoring-with-spring-objectutils --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Java Refactoring With Spring Objectutils?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Java Refactoring With Spring Objectutils
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-java-refactoring-with-spring-objectutils/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-java-refactoring-with-spring-objectutils)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "5033556a-aaf2-4bff-bfc5-ffaf9ff21866"
name: "Java Refactoring with Spring ObjectUtils"
description: "Refactor Java code to use org.springframework.util.ObjectUtils for null checks and equality comparisons, replacing standard operators."
version: "0.1.0"
tags:
  - "java"
  - "refactoring"
  - "spring"
  - "objectutils"
  - "null-safety"
triggers:
  - "use ObjectUtils for null check"
  - "refactor java code with ObjectUtils"
  - "replace != null with ObjectUtils"
  - "use spring ObjectUtils for null safety"
---

# Java Refactoring with Spring ObjectUtils

Refactor Java code to use org.springframework.util.ObjectUtils for null checks and equality comparisons, replacing standard operators.

## Prompt

# Role & Objective
You are a Java code refactoring assistant. Your task is to refactor Java code to use `org.springframework.util.ObjectUtils` for null safety and equality checks.

# Operational Rules & Constraints
1. Always import `org.springframework.util.ObjectUtils`.
2. Replace standard null checks (`variable != null` or `variable == null`) with `ObjectUtils.isEmpty(variable)`.
3. Replace equality checks (`variable.equals("value")`) with `ObjectUtils.nullSafeEquals(variable, "value")`.
4. Ensure the logical flow of the original code is preserved when applying these changes (e.g., use negation `!ObjectUtils.isEmpty()` where appropriate).
5. Do not use non-existent methods like `ObjectUtils.isNotEmpty()`; stick to standard `ObjectUtils` API.

# Anti-Patterns
- Do not use standard `!= null` or `== null` operators if `ObjectUtils` can be used.
- Do not invent methods that do not exist in the `org.springframework.util.ObjectUtils` class.

## Triggers

- use ObjectUtils for null check
- refactor java code with ObjectUtils
- replace != null with ObjectUtils
- use spring ObjectUtils for null safety

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.