Skip to content

Commit

Permalink
Fixes some Sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fathzer committed May 20, 2024
1 parent 4d9c85f commit a9632ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B -P sonar org.jacoco:jacoco-maven-plugin:prepare-agent test org.jacoco:jacoco-maven-plugin:report org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dorg.slf4j.simpleLogger.log.org.mockserver.log=warn -Dsonar.projectKey=fathzer_ajlib
run: mvn -B -Dsonar.coverage.exclusions=**/WindowsShortcut.java -P sonar org.jacoco:jacoco-maven-plugin:prepare-agent test org.jacoco:jacoco-maven-plugin:report org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dorg.slf4j.simpleLogger.log.org.mockserver.log=warn -Dsonar.projectKey=fathzer_ajlib
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,7 @@ protected DecimalFormat patchJavaBug4510618 (DecimalFormat format) {
if (sep==NON_BREAKING_SPACE || sep==FINE_NON_BREAKING_SPACE) {
decimalFormatSymbols.getClass().getDeclaredMethod("setMonetaryGroupingSeparator", char.class).invoke(decimalFormatSymbols, SPACE);
}
} catch (IllegalAccessException e) {
// Fucking java < 15
} catch (IllegalArgumentException e) {
// Fucking java < 15
} catch (InvocationTargetException e) {
// Fucking java < 15
} catch (NoSuchMethodException e) {
// Fucking java < 15
} catch (SecurityException e) {
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
// Fucking java < 15
}
format.setDecimalFormatSymbols(decimalFormatSymbols);
Expand Down Expand Up @@ -254,7 +246,7 @@ public Double getValue() {
if (DEBUG) {
System.out.println ("AmountWidget.getValue returns "+value);
}
return this.value==null?null:new Double(this.value.doubleValue());
return this.value==null?null: this.value.doubleValue();
}

/** Sets the current value.
Expand Down

0 comments on commit a9632ff

Please sign in to comment.