-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AEM-17 is claiming replace method is not mutable? #237
Comments
Hi @holdsworthr, thanks for reporting this. Looking https://github.com/wttech/AEM-Rules-for-SonarQube/blob/master/src/main/java/com/cognifide/aemrules/java/checks/ModifiableValueMapUsageCheck.java#L63, the rule only recognises I'm guessing that the implementation follows the
This is odd, because other methods inherited from Unless there's something I'm missing, both the AEM-17 Rule, and the Sling Javadoc could need a change. There may be a reason the Javadoc does not recommend using |
https://issues.apache.org/jira/browse/SLING-11878 has been raised |
@holdsworthr it looks like these methods are valid. I think we'll improve AEM-17 to no longer report them. In the meantime, I would suggest resolving these issues as a won't fix or false positive on your Sonar. |
apache/sling-org-apache-sling-api#48 has been merged. This means we should update the rule to allow the following methods in addition to the ones it currently supports:
|
Hi
I'm trying to get rid of this code smell but it appears this sonar rule believes the replace method is not mutable
The text was updated successfully, but these errors were encountered: