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 66ebd3c05abff9c1f2d9969adba0a196859d005e
Author: Haris Adzemovic <[email protected]>
AuthorDate: Tue Nov 12 10:53:19 2019 +0100

    Mark String comparisons using == with NOSONAR
    
    Sonarqube analysis warns about 8 violations of rule S4973. After PR
    discussion, it was decided that the warnings should not be acted upon and
    should instead be marked to not be included in future static analysis.
---
 .../sling/scripting/jsp/jasper/compiler/TagFileProcessor.java  |  4 ++--
 .../scripting/jsp/jasper/xmlparser/XMLEncodingDetector.java    | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/TagFileProcessor.java
 
b/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/TagFileProcessor.java
index 57f3d4b..f7b2028 100644
--- 
a/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/TagFileProcessor.java
+++ 
b/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/TagFileProcessor.java
@@ -445,10 +445,10 @@ class TagFileProcessor {
         private void checkUniqueName(String name, String type, Node n,
                 TagAttributeInfo attr) throws JasperException {
 
-            HashMap table = (type == VAR_NAME_FROM) ? nameFromTable : 
nameTable;
+            HashMap table = (type == VAR_NAME_FROM) ? nameFromTable : 
nameTable; //NOSONAR
             NameEntry nameEntry = (NameEntry) table.get(name);
             if (nameEntry != null) {
-                if (type != TAG_DYNAMIC || nameEntry.getType() != TAG_DYNAMIC) 
{
+                if (type != TAG_DYNAMIC || nameEntry.getType() != TAG_DYNAMIC) 
{ //NOSONAR
                     int line = nameEntry.getNode().getStart().getLineNumber();
                     err.jspError(n, "jsp.error.tagfile.nameNotUnique", type,
                             nameEntry.getType(), Integer.toString(line));
diff --git 
a/src/main/java/org/apache/sling/scripting/jsp/jasper/xmlparser/XMLEncodingDetector.java
 
b/src/main/java/org/apache/sling/scripting/jsp/jasper/xmlparser/XMLEncodingDetector.java
index 07524be..fab7c90 100644
--- 
a/src/main/java/org/apache/sling/scripting/jsp/jasper/xmlparser/XMLEncodingDetector.java
+++ 
b/src/main/java/org/apache/sling/scripting/jsp/jasper/xmlparser/XMLEncodingDetector.java
@@ -1327,7 +1327,7 @@ public class XMLEncodingDetector {
             String name = scanPseudoAttribute(scanningTextDecl, fString);
             switch (state) {
                 case STATE_VERSION: {
-                    if (name == fVersionSymbol) {
+                    if (name == fVersionSymbol) { //NOSONAR
                         if (!sawSpace) {
                             reportFatalError(scanningTextDecl
                                        ? 
"jsp.error.xml.spaceRequiredBeforeVersionInTextDecl"
@@ -1343,7 +1343,7 @@ public class XMLEncodingDetector {
                             err.jspError("jsp.error.xml.versionNotSupported",
                                         version);
                         }
-                    } else if (name == fEncodingSymbol) {
+                    } else if (name == fEncodingSymbol) { //NOSONAR
                         if (!scanningTextDecl) {
                             err.jspError("jsp.error.xml.versionInfoRequired");
                         }
@@ -1366,7 +1366,7 @@ public class XMLEncodingDetector {
                     break;
                 }
                 case STATE_ENCODING: {
-                    if (name == fEncodingSymbol) {
+                    if (name == fEncodingSymbol) { //NOSONAR
                         if (!sawSpace) {
                             reportFatalError(scanningTextDecl
                                       ? 
"jsp.error.xml.spaceRequiredBeforeEncodingInTextDecl"
@@ -1377,7 +1377,7 @@ public class XMLEncodingDetector {
                         state = scanningTextDecl ? STATE_DONE : 
STATE_STANDALONE;
                         // TODO: check encoding name; set encoding on
                         //       entity scanner
-                    } else if (!scanningTextDecl && name == fStandaloneSymbol) 
{
+                    } else if (!scanningTextDecl && name == fStandaloneSymbol) 
{ //NOSONAR
                         if (!sawSpace) {
                             
err.jspError("jsp.error.xml.spaceRequiredBeforeStandalone");
                         }
@@ -1392,7 +1392,7 @@ public class XMLEncodingDetector {
                     break;
                 }
                 case STATE_STANDALONE: {
-                    if (name == fStandaloneSymbol) {
+                    if (name == fStandaloneSymbol) { //NOSONAR
                         if (!sawSpace) {
                             
err.jspError("jsp.error.xml.spaceRequiredBeforeStandalone");
                         }

Reply via email to