diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d26f5b..3d4c751 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/src/main/java/com/fathzer/soft/ajlib/swing/widget/NumberWidget.java b/src/main/java/com/fathzer/soft/ajlib/swing/widget/NumberWidget.java index a1d5a01..e7d7f82 100644 --- a/src/main/java/com/fathzer/soft/ajlib/swing/widget/NumberWidget.java +++ b/src/main/java/com/fathzer/soft/ajlib/swing/widget/NumberWidget.java @@ -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); @@ -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.