jade-recipe-1.5-1.6-arrays-copyof

Replace System.arraycopy calls with Arrays.copyOf and copyOfRange in Java migrations.

1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/TheRealSeber/PolishedJADEite --skill jade-recipe-1-5-1-6-arrays-copyof
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jade-recipe-1.5-1.6-arrays-copyof
Source: https://github.com/TheRealSeber/PolishedJADEite/tree/main/.claude/skills/jade-recipe-1.5-1.6-arrays-copyof
Command: npx skills add https://github.com/TheRealSeber/PolishedJADEite --skill jade-recipe-1-5-1-6-arrays-copyof

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill replaces legacy System.arraycopy usage with clearer Java 6 array-copy APIs so migration work is faster, safer, and easier to verify.

Core Features & Use Cases

  • Direct Rewrite Support: Converts simple same-array and destination-zero copy patterns into Arrays.copyOf calls.
  • Review-Friendly Fallbacks: Leaves non-zero destination positions or complex expressions with NOTE comments for manual handling.
  • Migration Cleanup: Preserves the operational flag cleanup flow and adds the Arrays import when needed.
  • Use Case: A migration agent flags a copy operation in a Java 1.5 codebase, and this Skill turns it into the correct Java 6 rewrite while marking edge cases for review.

Quick Start

Apply this skill to the flagged file and line so it rewrites the array copy call, adds the needed import, and leaves clear notes for any manual follow-up.

Frequently Asked Questions about jade-recipe-1.5-1.6-arrays-copyof

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate System.arraycopy to Arrays.copyOf in Java 6?

This Skill automates the migration by converting simple System.arraycopy calls to Arrays.copyOf and Arrays.copyOfRange, adding the java.util.Arrays import, and preserving flag cleanup for verified Java 6 rewrites.

What happens to complex array copy expressions during Java migration?

Complex array copy expressions, including non-zero destination offsets, are not fully automated. The Skill leaves clear NOTE comments on these patterns for manual review to ensure safe Java migration.

When do I need to manually review Arrays.copyOfRange transformations?

You need to manually review Arrays.copyOfRange transformations when the original System.arraycopy call involves non-zero destination offsets or complex expressions that cannot be safely automated.

Does this Java code transformation handle adding the Arrays import?

Yes, this Java code transformation automatically adds the java.util.Arrays import when needed to support the new Arrays.copyOf or Arrays.copyOfRange calls.

Can I use this to refactor legacy Java 1.5 codebases to Java 6?

Yes, you can use this to refactor legacy Java 1.5 codebases by replacing legacy System.arraycopy usage with clearer Java 6 array-copy APIs, making migration work faster, safer, and easier to verify.

What are the limitations of automating System.arraycopy replacement?

The limitation of automating System.arraycopy replacement is that non-zero destination positions and complex expressions cannot be fully automated, requiring manual handling guided by NOTE comments.