Java

Write robust Java avoiding null traps, equality bugs, and concurrency pitfalls.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Java" with this command: npx skills add ivangdavila/java

Quick Reference

TopicFile
Nulls, Optional, autoboxingnulls.md
Collections and iteration trapscollections.md
Generics and type erasuregenerics.md
Concurrency and synchronizationconcurrency.md
Classes, inheritance, memoryclasses.md
Streams and CompletableFuturestreams.md
Testing (JUnit, Mockito)testing.md
JVM, GC, modulesjvm.md

Critical Rules

  • == compares references, not content — always use .equals() for strings
  • Override equals() must also override hashCode() — HashMap/HashSet break otherwise
  • Optional.get() throws if empty — use orElse(), orElseGet(), or ifPresent()
  • Modifying while iterating throws ConcurrentModificationException — use Iterator.remove()
  • Type erasure: generic type info gone at runtime — can't do new T() or instanceof List<String>
  • volatile ensures visibility, not atomicity — count++ still needs synchronization
  • Unboxing null throws NPE — Integer i = null; int x = i; crashes
  • Integer == Integer uses reference for values outside -128 to 127 — use .equals()
  • Try-with-resources auto-closes — implement AutoCloseable, Java 7+
  • Inner classes hold reference to outer — use static nested class if not needed
  • Streams are single-use — can't reuse after terminal operation
  • thenApply vs thenCompose — compose for chaining CompletableFutures
  • Records are implicitly final — can't extend, components are final
  • serialVersionUID mismatch breaks deserialization — always declare explicitly

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Amazon Expansion Playbook

亚马逊全球扩展实战手册 — 从美国到全球,帮助卖家突破单一市场增长瓶颈。覆盖北美→欧洲→日本→中东→东南亚五大市场,提供每个市场的入场策略、本地化和合规指南。触发词:amazon expansion, 全球扩展, 多市场, 跨境电商, international expansion, amazon global...

Registry SourceRecently Updated
General

Amazon Seasonal Planner

亚马逊旺季作战手册 — Prime Day/黑五/圣诞三场大考的全年备战指南。帮你告别旺季手忙脚乱的焦虑,提供从年初到年末的完整旺季规划、备货节奏、广告策略和库存管理。触发词:prime day, black friday, 旺季备战, 圣诞, seasonal planning, q4 planning, ho...

Registry SourceRecently Updated
General

Market Order Tracker

从接单到交付的全生命周期追踪。智能管理订单状态,自动提醒交期节点,让订单多而不乱、交付准时可靠,适合订单繁忙的贸易公司和工厂外贸部门。

Registry SourceRecently Updated
General

Amazon Pricing Intelligence

亚马逊科学定价策略助手 — 帮助卖家告别「定价靠拍脑袋,利润全靠运气」的时代。提供成本核算、同行参考、促销定价、利润优化和调价建议,让每一分利润都有据可依。支持美国、英国、德国、日本等主流市场。触发词:amazon pricing, 定价策略, 利润优化, pricing optimization, amazon...

Registry SourceRecently Updated