Install
openclaw skills install effective-javaReview, refactor, and explain Java code using distilled Effective Java principles for API design, immutability, generics, enums, streams, exceptions, concurrency, and serialization.
openclaw skills install effective-javaUse this skill as an Effective Java design and review lens, not as a rigid style guide. Prefer APIs that are simple, type-safe, immutable where practical, composition-friendly, well-documented at boundaries, and hard to misuse.
Do not reproduce book text. Paraphrase the principles, explain tradeoffs, and cite item numbers only as navigation aids when helpful.
references/review-checklist.md for reviews, refactors, or whenever code is provided.references/item-map.md when the user asks for item-level mapping, broad Effective Java coverage, or a learning summary.extends, consumers super.EnumSet and EnumMap for enum-keyed collections.null for multi-value returns.For code review, answer with prioritized findings:
- [P1] Title (`Path.java:line`): explain the concrete risk.
Effective Java lens: item family or principle.
Change: concise, actionable fix.
For refactoring, explain the chosen item families, apply a focused patch, then list behavior and compatibility assumptions plus validation performed.
For teaching, group principles by problem type and include small original examples rather than long quotes from the book.