[
https://issues.apache.org/jira/browse/SLING-10111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17576577#comment-17576577
]
Simon Tunnat commented on SLING-10111:
--------------------------------------
Okay I had another look and found the issue in my code.
It seems the warning message is wrong and reports on the wrong line and column.
Example:
{code:java}
<!-- reported line -->
<sly data-sly-test="${someObject.property}">
${someObject.property}
</sl>
[...]
<!-- line with an actual issue -->
<sly data-sly-test="someObject.property">
${someObject.property}
</sl> {code}
The htl-maven-plugin reported the first <sly> block but the actual issue was in
the second <sly> block.
I had the same problem in two different HTL files so it seems to be a general
problem.
> data-sly-test: redundant constant value comparison
> --------------------------------------------------
>
> Key: SLING-10111
> URL: https://issues.apache.org/jira/browse/SLING-10111
> Project: Sling
> Issue Type: Bug
> Components: Maven Plugins and Archetypes
> Affects Versions: HTL Maven Plugin 2.0.2-1.4.0
> Reporter: Marvin Flock
> Priority: Major
>
> The HTL-Maven-Plugin (when set with _failOnWarnings = true_) is failing with
> warnings like these:
> _data-sly-test: redundant constant value comparison_
> Problem is, this message is not giving a lot of insight, why it is failing.
> e.g.:
> I have a snippet like this:
> _data-sly-test=${object.property}_
> It fails with the mentioned warning and I am fishing in the dark.
> It is a valid test, it checks _object.property_ for _null_, right?
> Is it maybe a false positive?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)