This is an automated email from the ASF dual-hosted git repository. cziegeler pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-jsp.git
commit 8aa4692ab2856bb7c91770fcc84c5d8d27da16e2 Author: Haris Adzemovic <[email protected]> AuthorDate: Tue Nov 12 11:23:04 2019 +0100 Add NOSONAR to lines indicated to use == intentionally There are source code comments indicating that the usage of the "==" operator is by design. Hence, the false-positive violations raised by static analysis should be suppressed. --- .../org/apache/sling/scripting/jsp/jasper/compiler/Parser.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/Parser.java b/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/Parser.java index f353fde..4496941 100644 --- a/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/Parser.java +++ b/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/Parser.java @@ -1617,7 +1617,7 @@ class Parser implements TagConstants { err.jspError(start, "jasper.error.emptybodycontent.nonempty", tag); } - } else if (bodyType == JAVAX_BODY_CONTENT_PLUGIN) { + } else if (bodyType == JAVAX_BODY_CONTENT_PLUGIN) { //NOSONAR // (note the == since we won't recognize JAVAX_* // from outside this module). parsePluginTags(parent); @@ -1627,8 +1627,8 @@ class Parser implements TagConstants { } } else if (bodyType.equalsIgnoreCase(TagInfo.BODY_CONTENT_JSP) || bodyType.equalsIgnoreCase(TagInfo.BODY_CONTENT_SCRIPTLESS) - || (bodyType == JAVAX_BODY_CONTENT_PARAM) - || (bodyType == JAVAX_BODY_CONTENT_TEMPLATE_TEXT)) { + || (bodyType == JAVAX_BODY_CONTENT_PARAM) //NOSONAR + || (bodyType == JAVAX_BODY_CONTENT_TEMPLATE_TEXT)) { //NOSONAR while (reader.hasMoreInput()) { if (reader.matchesETag(tag)) { return; @@ -1649,12 +1649,12 @@ class Parser implements TagConstants { } else if (bodyType .equalsIgnoreCase(TagInfo.BODY_CONTENT_SCRIPTLESS)) { parseElementsScriptless(parent); - } else if (bodyType == JAVAX_BODY_CONTENT_PARAM) { + } else if (bodyType == JAVAX_BODY_CONTENT_PARAM) { //NOSONAR // (note the == since we won't recognize JAVAX_* // from outside this module). reader.skipSpaces(); parseParam(parent); - } else if (bodyType == JAVAX_BODY_CONTENT_TEMPLATE_TEXT) { + } else if (bodyType == JAVAX_BODY_CONTENT_TEMPLATE_TEXT) { //NOSONAR parseElementsTemplateText(parent); } }
