Cloud Manager code quality · Content package rules (OakPAL) · updated
CQBP-84: Customers should not implement or extend Product APIs annotated with @ProviderType
CQBP-84 fires when your code implements or extends an AEM interface annotated @ProviderType; Adobe's example is a class implementing com.day.cq.wcm.api.Page. Stop implementing it: wrap or adapt the product object instead, and keep your own interface for anything custom.
| Rule key | CQBP-84 |
|---|---|
| Adobe's rule name | Customers should not implement or extend Product APIs annotated with @ProviderType |
| Type | Bug |
| Severity | Critical |
| Since | 2018.7.0 |
| Checked by | OakPAL scan of your content packages |
Why Cloud Manager flags it
In OSGi semantic versioning, @ProviderType means 'only the provider (Adobe) implements this'. Adobe may add methods to such an interface in a minor version, which is fine for code that calls it but breaks code that implements it: your class no longer satisfies the interface and fails to load. On AEM as a Cloud Service the product updates continuously, so this can happen without any change on your side.
Most hits come from test stubs, decorators (a 'SafePage' that implements Page and delegates) and old integrations. Test code compiled only in src/test is usually not deployed, but the rule may still report it depending on how the module is built.
Replacement patterns
| Why you implemented it | Do this instead |
|---|---|
| Decorator adding helper methods | A Sling Model adapted from Page or Resource, holding the Page |
| Fake Page in unit tests | AEM Mocks (io.wcm.testing) to create real pages in a mock repository |
| Custom Page for a non-JCR source | Your own interface; adapt to Page only where AEM needs it |
Example
Non-compliant (as in Adobe's example)
public class CustomPage implements com.day.cq.wcm.api.Page {
// ... delegates to a real page
}Compliant: a model that holds the page
@Model(adaptables = Resource.class)
public class PageInfo {
@ScriptVariable private Page currentPage;
public String getNavTitle() {
return Optional.ofNullable(currentPage.getNavigationTitle()).orElse(currentPage.getTitle());
}
}How to fix it
- List classes that implement com.day.cq.*, com.adobe.* or org.apache.sling.* interfaces; check each interface's package-info or Javadoc for @ProviderType.
- Replace decorators with composition (a field holding the product object).
- Move test doubles to AEM Mocks.
- Rebuild against the latest AEM SDK API JAR to confirm nothing else implements provider types.
Does it stop the pipeline?
A critical bug lowers the Reliability Rating to D. Adobe's critical gate only trips below D, so on its own it does not stop the pipeline, but it is one step away and it shows as an open issue in the report.
If a finding is a genuine false positive, Adobe's code quality page lets you annotate the code with @SuppressWarnings and the rule ID. In a full-stack pipeline, important failures can be overridden by a deployment manager, project manager or business lead; in a code-quality-only pipeline they cannot.
Related pages on this site
Questions
How do I know an interface is @ProviderType?
It is annotated on the interface or in the package's package-info.java (org.osgi.annotation.versioning.ProviderType). The AEM SDK Javadoc shows it.
Are @ConsumerType interfaces fine to implement?
Yes. @ConsumerType interfaces, such as many listener and process interfaces, are meant to be implemented by you.
Does this stop the pipeline?
A critical bug lowers the Reliability Rating to D, the last passing grade, so not by itself. It can stop your site after an AEM update, which is worse.
See the Cloud Service blockers in your code before Cloud Manager shows them. The free Surge Migrate readiness scan reads a repository zip or a Best Practices Analyzer CSV in your browser and lists them with file, fix and effort. Nothing is uploaded.
Sources
- Adobe: Custom code quality rules (checked 10 Nov 2026)
- Adobe: Code quality testing in Cloud Manager (checked 10 Nov 2026)
Rule key, type, severity and version are as listed on Adobe's page, checked 10 Nov 2026. Explanations and examples are ours unless marked as Adobe's.