This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git
The following commit(s) were added to refs/heads/master by this push:
new e578fd0 sonarqube issue -Refactor the code in order to not assign to
this loop counter from within the loop body. (#593)
e578fd0 is described below
commit e578fd013605ce1a9ce4f10930cefaec4d5efc2a
Author: nanthakumar1305 <[email protected]>
AuthorDate: Tue Feb 2 14:05:58 2021 +0530
sonarqube issue -Refactor the code in order to not assign to this loop
counter from within the loop body. (#593)
---
.../org/apache/hop/core/database/SqlScriptParser.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git
a/core/src/main/java/org/apache/hop/core/database/SqlScriptParser.java
b/core/src/main/java/org/apache/hop/core/database/SqlScriptParser.java
index 4ca4cc0..7fc5e41 100644
--- a/core/src/main/java/org/apache/hop/core/database/SqlScriptParser.java
+++ b/core/src/main/java/org/apache/hop/core/database/SqlScriptParser.java
@@ -71,13 +71,13 @@ public class SqlScriptParser {
case '/':
if ( nextCh == '*' ) {
mode = MODE.BLOCK_COMMENT;
- i++;
+ i = i + 1;
}
break;
case '-':
if ( nextCh == '-' ) {
mode = MODE.LINE_COMMENT;
- i++;
+ i = i + 1;
}
break;
case '\'':
@@ -98,7 +98,7 @@ public class SqlScriptParser {
if ( ch == '*' ) {
if ( nextCh == '/' ) {
mode = MODE.SQL;
- i++;
+ i = i + 1;
}
}
break;
@@ -113,7 +113,7 @@ public class SqlScriptParser {
* The user is hard-coding a backslash into the string.
* Pass the hard-coded backslash through, and skip over the real
backslash on the next loop
*/
- i++;
+ i = i + 1;
} else if ( ch == '\\' && nextCh == currentStringChar &&
usingBackslashAsEscapeCharForQuotation ) {
/*
* The user is hard-coding a quote character into the string.
@@ -130,7 +130,7 @@ public class SqlScriptParser {
* In any way a construction '\'|| is correct for Oracle but for
others DBs (ex. MySQl) isn't correct.
*
*/
- i++;
+ i = i + 1;
} else if ( ch == currentStringChar ) {
mode = MODE.SQL;
}
@@ -173,14 +173,14 @@ public class SqlScriptParser {
case '/':
if ( nextCh == '*' && nextPlusOneCh != '+' ) {
mode = MODE.BLOCK_COMMENT;
- i++;
+ i = i + 1;
ch = 0;
}
break;
case '-':
if ( nextCh == '-' ) {
mode = MODE.LINE_COMMENT;
- i++;
+ i = i + 1;
ch = 0;
}
break;
@@ -195,7 +195,7 @@ public class SqlScriptParser {
if ( ch == '*' ) {
if ( nextCh == '/' ) {
mode = MODE.SQL;
- i++;
+ i = i + 1;
}
}
ch = 0;