Code review checklist
Purpose: The AEM-specific review points that generic Java/JS review habits miss.
Who this page is for
| Audience | Why it matters to you |
|---|---|
| All engineers | Reviewers and authors alike |
Content & components
- [ ] Component safe when dialog fields are empty (new instance renders placeholder, no exception)
- [ ] HTL only — no logic that belongs in the model; no
context='unsafe'(or it has a security sign-off) - [ ] Dialog fields validated; author-facing labels/descriptions present
- [ ] resourceSuperType used instead of copied product code; proxy pattern intact
- [ ] No hardcoded content paths (site roots resolved relative to current page); MSM/language-copy safe
- [ ] Style System used for variants instead of forked components
Java
- [ ] No admin resolvers/sessions — service users only; resolvers closed (try-with-resources)
- [ ] Sling Models: OPTIONAL injection + defaults; logic in @PostConstruct; unit tests incl. empty content
- [ ] Queries: bounded (p.limit), path+type constrained, index verified (Explain Query on new patterns)
- [ ] Long/background work in jobs, not listeners or request threads; jobs idempotent
- [ ] Outbound HTTP: timeouts, pooling, fallback, no render-path calls without cache+breaker
- [ ] Logging: right levels, parameterised, no PII/secrets
Delivery & config
- [ ] New URLs cacheable (extension, no mandatory query strings) or deliberately excluded + documented
- [ ] Dispatcher filters/invalidate rules updated for any new endpoint (JSON included)
- [ ] OSGi config per run mode in ui.config; no environment ifs in code; no secrets in repo
- [ ] Clientlibs: correct categories/embeds, versioned, no direct /apps script tags
- [ ] Package filters reviewed — no overlap with content paths, no /libs
Tests & docs
- [ ] Unit tests for models/services; integration test if a critical flow changed
- [ ] a11y checked for new markup (accessibility)
- [ ] README/runbook touched if operational behaviour changed