A compatibility adapter preserves an existing interface by translating between an older format and a newer one. Existing clients keep working while newer behavior is introduced alongside the old contract. section 9.4.2
Use an adapter when evolving an exposed system:
- Place an intermediary layer between existing clients and the new format. section 9.4.2
- Keep older methods available long enough for users to plan migration, even when they are deprecated. section 9.4.2
- Weigh reduced client disruption against added maintenance overhead and the risk of hiding design debt. section 9.4.2
Preserving a changing endpoint
If an endpoint URL or response format changes, an adapter can translate requests or data so existing client applications continue using the older contract while the newer interface is adopted. section 9.4.2
@Deprecated(since = "2.1", forRemoval = true)
public void generateReport() { ... }
Deprecation markers make the migration boundary visible while the older entry point remains available. section 9.4.2








