Browse Source

[Improvement][Style] Update spotless junit4 check scope (#12450)

3.2.0-release
Eric Gao 2 years ago committed by GitHub
parent
commit
0a6e8af864
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      dolphinscheduler-microbench/src/main/java/org/apache/dolphinscheduler/microbench/base/AbstractBaseBenchmark.java
  2. 6
      pom.xml

15
dolphinscheduler-microbench/src/main/java/org/apache/dolphinscheduler/microbench/base/AbstractBaseBenchmark.java

@ -117,8 +117,17 @@ public abstract class AbstractBaseBenchmark {
}
private static int getForks() {
String value = System.getProperty("forkCount");
return null != value ? Integer.parseInt(value) : -1;
}
String forkCount = System.getProperty("forkCount");
if (forkCount == null) {
return -1;
}
try {
return Integer.parseInt(forkCount);
} catch (NumberFormatException e) {
logger.error("fail to convert forkCount into int", e);
}
return -1;
}
}

6
pom.xml

@ -640,11 +640,6 @@
<version>${spotless.version}</version>
<configuration>
<java>
<!--TODO: Remove the following excludes section when junit4 removed from e2e and microbench module-->
<excludes>
<exclude>**/e2e/**/*.java</exclude>
<exclude>**/microbench/**/*.java</exclude>
</excludes>
<eclipse>
<file>style/spotless_dolphinscheduler_formatter.xml</file>
</eclipse>
@ -693,7 +688,6 @@
<include>docs/**/*.md</include>
</includes>
<excludes>
<!--Avoid conflicts with formatting tools in some special modules-->
<exclude>**/.github/**/*.md</exclude>
</excludes>
<flexmark />

Loading…
Cancel
Save