Update checkstyle to version 8.13
This commit is contained in:
parent
e99b0dde8e
commit
46ea7e5e96
9
pom.xml
9
pom.xml
|
@ -618,6 +618,8 @@
|
|||
<commons.encoding>utf-8</commons.encoding>
|
||||
|
||||
<checkstyle.plugin.version>3.0.0</checkstyle.plugin.version>
|
||||
<checkstyle.version>8.13</checkstyle.version>
|
||||
|
||||
<spotbugs.plugin.version>3.1.6</spotbugs.plugin.version>
|
||||
<japicmp.skip>false</japicmp.skip>
|
||||
|
||||
|
@ -734,6 +736,13 @@
|
|||
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||
<enableRulesSummary>false</enableRulesSummary>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>${checkstyle.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.github.spotbugs</groupId>
|
||||
|
|
|
@ -474,16 +474,27 @@ public class RandomStringUtilsTest {
|
|||
final String set = "abc";
|
||||
final char[] chars = set.toCharArray();
|
||||
String gen = "";
|
||||
final int[] counts = {0,0,0};
|
||||
final int[] expected = {200,200,200};
|
||||
final int[] counts = {0, 0, 0};
|
||||
final int[] expected = {200, 200, 200};
|
||||
for (int i = 0; i< 100; i++) {
|
||||
gen = RandomStringUtils.random(6,chars);
|
||||
for (int j = 0; j < 6; j++) {
|
||||
switch (gen.charAt(j)) {
|
||||
case 'a': {counts[0]++; break;}
|
||||
case 'b': {counts[1]++; break;}
|
||||
case 'c': {counts[2]++; break;}
|
||||
default: {fail("generated character not in set");}
|
||||
case 'a': {
|
||||
counts[0]++;
|
||||
break;
|
||||
}
|
||||
case 'b': {
|
||||
counts[1]++;
|
||||
break;
|
||||
}
|
||||
case 'c': {
|
||||
counts[2]++;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
fail("generated character not in set");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue