Skip to content

Commit

Permalink
Merge pull request #471 from hazendaz/spotbugs
Browse files Browse the repository at this point in the history
Adjustments for jdk 17 site building and few formatting items
  • Loading branch information
hazendaz authored Jul 24, 2022
2 parents 6b848fd + cf3dbf8 commit 67bc0c1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coveralls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'
- name: Report Coverage to Coveralls for Pull Requests
if: github.event_name == 'pull_request'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'
- name: Analyze with Coverity
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/it.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'
- name: Build Setup
run: ./mvnw clean install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'
- uses: webfactory/ssh-agent@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-XX:+TieredCompilation -XX:TieredStopAtLevel=1
-XX:+TieredCompilation -XX:TieredStopAtLevel=1 --add-opens=java.base/java.io=ALL-UNNAMED
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
<!-- Override spotbugs to this version from base-parent -->
<spotbugs.version>4.7.1</spotbugs.version>

<!-- Groovy doesn't like simple '8' for java 8 -->
<!-- Groovymavenplus doesn't like simple '8' for java 8 until next release -->
<java.version>1.8</java.version>

<junitVersion>5.9.0-RC1</junitVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,8 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {
def logMsg = priorityName + ': ' + bug.LongMessage.text() + SpotBugsInfo.BLANK + bug.SourceLine.'@classname' + SpotBugsInfo.BLANK +
bug.SourceLine.Message.text() + SpotBugsInfo.BLANK + bug.'@type'

if (priorityNum <= priorityThresholdNum) { // lower is more severe
// lower is more severe
if (priorityNum <= priorityThresholdNum) {
bugCountAboveThreshold += 1
log.error(logMsg)
} else {
Expand All @@ -537,7 +538,7 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {

log.info('\n\n\nTo see bug detail using the Spotbugs GUI, use the following command "mvn spotbugs:gui"\n\n\n')

if ( (bugCountAboveThreshold || errorCount) && failOnError ) {
if ((bugCountAboveThreshold || errorCount) && failOnError) {
throw new MojoExecutionException("failed with ${bugCountAboveThreshold} bugs and ${errorCount} errors ")
}
}
Expand Down

0 comments on commit 67bc0c1

Please sign in to comment.