Hi community,
i'm receiving this error:
"
The product interface com.day.cq.dam.api.Rendition annotated with @ProviderType should not be implemented by custom code. Detected in com.adobe.cq.wcm.core.components.internal.servlets.EnhancedRendition contained in /apps/<MYPROJECT>-vendor-packages/application/install/core.wcm.components.core-2.15.2.jar.
"
during the cloud manager deploy as Critical Bug CQRules:CQBP-84.
The project it was created with archetype 27.
I found this article: https://github.com/adobe/aem-project-archetype/issues/736
Any suggest about?
As per now i'm receiving D rating for that.
Solved! Go to Solution.
Views
Replies
Total Likes
Upgrade the core jar to 2.17-
I could see below code in 2.15 jar-
public class EnhancedRendition extends ResourceWrapper implements Rendition {
private static final Logger LOG = LoggerFactory.getLogger(EnhancedRendition.class);
private Rendition rendition;
private Dimension dimension;
private boolean dimensionProcessed = false;
public EnhancedRendition(@NotNull Rendition rendition) {
super(rendition);
this.rendition = rendition;
}
/**
* Getter for the rendition's dimension.
*
* @Return rendition
which is causing issue(EnhancedRendition extends ResourceWrapper implements Rendition).
Key: CQBP-84
Type: Bug
Severity: Critical
Since: Version 2018.7.0
The AEM API contains Java interfaces and classes which are only meant to be used, but not implemented, by custom code. For example, the interface com.day.cq.wcm.api.Page is designed to be implemented by AEM only.
When new methods are added to these interfaces, those additional methods do not impact existing code which uses these interfaces and, as a result, the addition of new methods to these interfaces are considered to be backwards-compatible. However, if custom code implements one of these interfaces, that custom code has introduced a backwards-compatibility risk for the customer.
Interfaces (and classes) which are only intended to be implemented by AEM are annotated with org.osgi.annotation.versioning.ProviderType (or, in some cases, a similar legacy annotation aQute.bnd.annotation.ProviderType). This rule identifies the cases where such an interface is implemented (or a class is extended) by custom code.
import com.day.cq.wcm.api.Page; public class DontDoThis implements Page { // implementation here }
In 2.17 jar -
/**
* A {@link Rendition} delegate that facilitates finding out the rendition's dimensions.
*/
public class EnhancedRendition {
private static final Logger LOG = LoggerFactory.getLogger(EnhancedRendition.class);
private Rendition rendition;
private Dimension dimension;
private boolean dimensionProcessed = false;
public EnhancedRendition(@notnull Rendition rendition) {
this.rendition = rendition;
}
/**
* Getter for the rendition's dimension.
*
* @Return rendition's dimension if possible to determine, {@code null} otherwise
*/
So this particular issue would be resolved if you use the latest core component jar file.
Hope that solves the pipeline code quality issue.
Regards
Ankur
Upgrade the core jar to 2.17-
I could see below code in 2.15 jar-
public class EnhancedRendition extends ResourceWrapper implements Rendition {
private static final Logger LOG = LoggerFactory.getLogger(EnhancedRendition.class);
private Rendition rendition;
private Dimension dimension;
private boolean dimensionProcessed = false;
public EnhancedRendition(@NotNull Rendition rendition) {
super(rendition);
this.rendition = rendition;
}
/**
* Getter for the rendition's dimension.
*
* @Return rendition
which is causing issue(EnhancedRendition extends ResourceWrapper implements Rendition).
Key: CQBP-84
Type: Bug
Severity: Critical
Since: Version 2018.7.0
The AEM API contains Java interfaces and classes which are only meant to be used, but not implemented, by custom code. For example, the interface com.day.cq.wcm.api.Page is designed to be implemented by AEM only.
When new methods are added to these interfaces, those additional methods do not impact existing code which uses these interfaces and, as a result, the addition of new methods to these interfaces are considered to be backwards-compatible. However, if custom code implements one of these interfaces, that custom code has introduced a backwards-compatibility risk for the customer.
Interfaces (and classes) which are only intended to be implemented by AEM are annotated with org.osgi.annotation.versioning.ProviderType (or, in some cases, a similar legacy annotation aQute.bnd.annotation.ProviderType). This rule identifies the cases where such an interface is implemented (or a class is extended) by custom code.
import com.day.cq.wcm.api.Page; public class DontDoThis implements Page { // implementation here }
In 2.17 jar -
/**
* A {@link Rendition} delegate that facilitates finding out the rendition's dimensions.
*/
public class EnhancedRendition {
private static final Logger LOG = LoggerFactory.getLogger(EnhancedRendition.class);
private Rendition rendition;
private Dimension dimension;
private boolean dimensionProcessed = false;
public EnhancedRendition(@notnull Rendition rendition) {
this.rendition = rendition;
}
/**
* Getter for the rendition's dimension.
*
* @Return rendition's dimension if possible to determine, {@code null} otherwise
*/
So this particular issue would be resolved if you use the latest core component jar file.
Hope that solves the pipeline code quality issue.
Regards
Ankur
Hi @Ankur_Khare thank you...able to see this working with core.wcm.components.core-2.17.12.jar
Hi @Ankur_Khare
I am facing similar issue with the code scanning. Could you suggest me how to solve this
The product interface org.apache.sling.api.resource.Resource annotated with @ProviderType should not be implemented by custom code. Detected in org.apache.sling.servlethelpers.internalrequests.ServletResolutionResource contained in /apps/aem-ancestrycomoperationsinc-project/install/org.apache.sling.servlet-helpers-1.4.6.jar.
Views
Replies
Total Likes
Views
Likes
Replies