Skip to content
Permalink
Browse files

chore: add EmptyStatement checkstyle rule (#1400)

* chore: add EmptyStatement checkstyle rule
  • Loading branch information...
AlexElin authored and davecramer committed Feb 17, 2019
1 parent 7b52b0c commit 4cd3f05a4697ff61ff01d80828888bfbe086e8c5
@@ -114,6 +114,7 @@
<message key="name.invalidPattern"
value="Package name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="MemberName"/>
<module name="ParameterName"/>
@@ -446,7 +446,7 @@ public static int parseSingleQuotes(final char[] query, int offset,
*/
public static int parseDoubleQuotes(final char[] query, int offset) {
while (++offset < query.length && query[offset] != '"') {
;
// do nothing
}
return offset;
}
@@ -1257,10 +1257,11 @@ private static int parseSql(char[] sql, int i, StringBuilder newsql, boolean sto
return i;
}


private static int findOpenBrace(char[] sql, int i) {
int posArgs;
for (posArgs = i; posArgs < sql.length && sql[posArgs] != '('; posArgs++) {
;
int posArgs = i;
while (posArgs < sql.length && sql[posArgs] != '(') {
posArgs++;
}
return posArgs;
}
@@ -1189,17 +1189,15 @@ private static void appendArray(StringBuilder sb, Object elements, char delim) {

// Parse a "dirty" integer surrounded by non-numeric characters
private static int integerPart(String dirtyString) {
int start;
int end;
int start = 0;

for (start = 0; start < dirtyString.length()
&& !Character.isDigit(dirtyString.charAt(start)); ++start) {
;
while (start < dirtyString.length() && !Character.isDigit(dirtyString.charAt(start))) {
++start;
}

for (end = start; end < dirtyString.length()
&& Character.isDigit(dirtyString.charAt(end)); ++end) {
;
int end = start;
while (end < dirtyString.length() && Character.isDigit(dirtyString.charAt(end))) {
++end;
}

if (start == end) {
@@ -86,7 +86,7 @@ public void testStreamCanBeClosedAfterReadUp() throws SQLException, IOException

byte[] buff = new byte[100];
while (sut.read(buff) > 0) {
;
// do nothing
}

sut.close();

0 comments on commit 4cd3f05

Please sign in to comment.
You can’t perform that action at this time.