Skip to content

Conversation

@paulochang
Copy link

Q                       A
Fixed Issues? Fixes #2776
Patch: Bug Fix? 👍
Minor: New Feature? No
Major: Breaking Change? No
Tests Added + Pass? No (Existing tests are enough)
Documentation Provided No (Existing docs are enough)
Any Dependency Changes? No
License Apache License, Version 2.0

I have replaced all the initialization and calls to the general Component model with a call to the specific component model for each model.

Example:

Given the existing Button HTL code

<button data-sly-use.button="com.adobe.cq.wcm.core.components.models.Button"
        data-sly-use.component="com.adobe.cq.wcm.core.components.models.Component"
        ....
        id="${component.id}"

I have done a replacement with the following code instead

<button data-sly-use.button="com.adobe.cq.wcm.core.components.models.Button"
        ...
        id="${button.id}"

The testing property was mistakenly replaced on the text markup.
There was a missing placeholder in the string to be formatted on the selector variable
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 7, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@paulochang paulochang requested a review from HitmanInWis June 10, 2024 14:27
@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Component model is unnecessarily initialized

2 participants