diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11c0bb13..d5272594 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,29 +7,25 @@ on: branches: [ main ] jobs: - build: + matrix-build: strategy: matrix: - java: [17] + java: [21] os: ['ubuntu-latest', 'windows-latest'] - include: - - os: ubuntu-latest - java: 20 concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.java }} cancel-in-progress: true name: Build on ${{ matrix.os }} with Java ${{ matrix.java }} runs-on: ${{ matrix.os }} env: - DEFAULT_JAVA: 17 + DEFAULT_JAVA: 21 DEFAULT_OS: 'ubuntu-latest' steps: - uses: actions/checkout@v4 - - - name: Fetch all history for all tags and branches - run: git fetch --prune --unshallow + with: + fetch-depth: 0 - uses: actions/setup-java@v4 with: @@ -53,7 +49,7 @@ jobs: - name: Sonar analysis if: ${{ env.DEFAULT_JAVA == matrix.java && env.DEFAULT_OS == matrix.os && env.SONAR_TOKEN != null }} run: | - ./gradlew sonarqube -Dsonar.login=$SONAR_TOKEN --info --warning-mode=summary -PjavaVersion=${{ matrix.java }} + ./gradlew sonarqube -Dsonar.token=$SONAR_TOKEN --info --warning-mode=summary -PjavaVersion=${{ matrix.java }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} @@ -95,3 +91,10 @@ jobs: with: name: checksums-${{ runner.os }} path: jfxui/build/generatedChecksums/* + + + build: + needs: matrix-build + runs-on: ubuntu-latest + steps: + - run: echo "Build successful" \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1e0eac72..e0970419 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -18,6 +18,8 @@ jobs: strategy: fail-fast: false + matrix: + language: ['java'] steps: - name: Checkout repository @@ -28,7 +30,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 17 + java-version: 21 cache: 'gradle' - uses: gradle/wrapper-validation-action@v1 @@ -36,7 +38,7 @@ jobs: - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: - languages: java + languages: ${{ matrix.language }} - name: Autobuild uses: github/codeql-action/autobuild@v3 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 2c8b3d15..d7c7a5b1 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -48,6 +48,7 @@ org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_record_components=16 org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 @@ -110,6 +111,7 @@ org.eclipse.jdt.core.formatter.comment.indent_tag_description=false org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags=false org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true diff --git a/.settings/org.eclipse.jdt.ui.prefs b/.settings/org.eclipse.jdt.ui.prefs index 76a36751..ef0c8489 100644 --- a/.settings/org.eclipse.jdt.ui.prefs +++ b/.settings/org.eclipse.jdt.ui.prefs @@ -1,7 +1,7 @@ eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_itsallcode style -formatter_settings_version=22 +formatter_settings_version=23 org.eclipse.jdt.ui.ignorelowercasenames=true org.eclipse.jdt.ui.importorder=java;javax;org;com; org.eclipse.jdt.ui.ondemandthreshold=99 diff --git a/.vscode/settings.json b/.vscode/settings.json index 8c68bb7c..79c0fd49 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,5 +20,6 @@ "connectionId": "itsallcode", "projectKey": "white-rabbit" }, - "java.compile.nullAnalysis.mode": "automatic" + "java.compile.nullAnalysis.mode": "automatic", + "java.configuration.updateBuildConfiguration": "automatic" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c956eff..f4b3e4f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,11 @@ See [Release](https://github.com/itsallcode/white-rabbit/releases/tag/v1.9.0) / ### Breaking Changes +This release requires Java 21. + * [#239](https://github.com/itsallcode/white-rabbit/pull/239): Removed pmsmart plugin as it is not maintained any more. * [#245](https://github.com/itsallcode/white-rabbit/pull/245): Removed webstart deployment. +* [#265](https://github.com/itsallcode/white-rabbit/pull/265): Upgraded dependencies, require Java 21. ### Changes / Bugfixes diff --git a/api/.settings/org.eclipse.jdt.core.prefs b/api/.settings/org.eclipse.jdt.core.prefs index 6c3a7e6a..ee52ae3d 100644 --- a/api/.settings/org.eclipse.jdt.core.prefs +++ b/api/.settings/org.eclipse.jdt.core.prefs @@ -42,9 +42,9 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature=do not generate org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.shareCommonFinallyBlocks=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -169,7 +169,7 @@ org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.processAnnotations=disabled org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.compiler.storeAnnotations=disabled org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL @@ -216,6 +216,7 @@ org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_record_components=16 org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 @@ -278,6 +279,7 @@ org.eclipse.jdt.core.formatter.comment.indent_tag_description=false org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags=false org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true diff --git a/api/.settings/org.eclipse.jdt.ui.prefs b/api/.settings/org.eclipse.jdt.ui.prefs index 27c1e6bf..ce6cad74 100644 --- a/api/.settings/org.eclipse.jdt.ui.prefs +++ b/api/.settings/org.eclipse.jdt.ui.prefs @@ -1,7 +1,12 @@ eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_itsallcode style -formatter_settings_version=22 +formatter_settings_version=23 +org.eclipse.jdt.ui.exception.name=exception +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.text.custom_code_templates= sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false @@ -12,6 +17,7 @@ sp_cleanup.add_missing_nls_tags=false sp_cleanup.add_missing_override_annotations=true sp_cleanup.add_missing_override_annotations_interface_methods=true sp_cleanup.add_serial_version_id=false +sp_cleanup.also_simplify_lambda=false sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=false @@ -112,6 +118,7 @@ sp_cleanup.strictly_equal_or_different=false sp_cleanup.stringbuffer_to_stringbuilder=false sp_cleanup.stringbuilder=false sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_stringbuffer_stringbuilder=false sp_cleanup.stringconcat_to_textblock=false sp_cleanup.substring=false sp_cleanup.switch=false diff --git a/build.gradle b/build.gradle index 6e20f740..bdc84760 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,12 @@ plugins { id 'eclipse' - id "org.sonarqube" version "4.3.1.3277" + id "org.sonarqube" version "4.4.1.3373" id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7" id "io.codearte.nexus-staging" version "0.30.0" id 'com.github.johnrengelman.shadow' version '8.1.1' apply false id "com.moowork.node" version "1.3.1" apply false - id "com.github.ben-manes.versions" version "0.48.0" - id "org.panteleyev.jpackageplugin" version "1.5.2" apply false + id "com.github.ben-manes.versions" version "0.50.0" + id "org.panteleyev.jpackageplugin" version "1.6.0" apply false id "org.gradle.crypto.checksum" version "1.4.0" apply false } @@ -20,7 +20,7 @@ def getProjectVersion() { version = getProjectVersion() group = "org.itsallcode.whiterabbit" -def javaVersion = project.hasProperty('javaVersion') ? project.getProperty('javaVersion') : 17 +def javaVersion = project.hasProperty('javaVersion') ? project.getProperty('javaVersion') : 21 subprojects { group = rootProject.group @@ -48,6 +48,15 @@ subprojects { suites { test { useJUnitJupiter(libs.versions.junitJupiter.get()) + targets { + all { + testTask.configure { + // Suppress warning caused by Mockito: + // WARNING: A Java agent has been loaded dynamically (.../byte-buddy-agent-1.14.11.jar) + jvmArgs("-XX:+EnableDynamicAgentLoading") + } + } + } } } } diff --git a/docs/user_guide.md b/docs/user_guide.md index 11cbd826..f4fbb9d0 100644 --- a/docs/user_guide.md +++ b/docs/user_guide.md @@ -3,7 +3,7 @@ ## Install WhiteRabbit as Executable JAR -Precondition: Install Java Runtime Environment (JRE) 17, e.g. from [Adoptium / Eclipse Temurin](https://adoptium.net/). +Precondition: Install Java Runtime Environment (JRE) 21, e.g. from [Adoptium / Eclipse Temurin](https://adoptium.net/). 1. Download the `.jar` file from the latest [release](https://github.com/itsallcode/white-rabbit/releases) 2. Launch it by diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7f93135c..d64cd491 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ac72c34e..1af9e093 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 0adc8e1a..1aa94a42 100755 --- a/gradlew +++ b/gradlew @@ -145,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -153,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -202,11 +202,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/jfxui/.settings/org.eclipse.jdt.core.prefs b/jfxui/.settings/org.eclipse.jdt.core.prefs index 508e176f..c507a4ce 100644 --- a/jfxui/.settings/org.eclipse.jdt.core.prefs +++ b/jfxui/.settings/org.eclipse.jdt.core.prefs @@ -42,9 +42,9 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature=do not generate org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.shareCommonFinallyBlocks=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -131,7 +131,7 @@ org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info -org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.tasks=warning org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning @@ -169,7 +169,7 @@ org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.processAnnotations=disabled org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.compiler.storeAnnotations=disabled org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL @@ -178,7 +178,7 @@ org.eclipse.jdt.core.computeJavaBuildOrder=ignore org.eclipse.jdt.core.encoding=utf8 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 -org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=true +org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=false org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false org.eclipse.jdt.core.formatter.align_with_spaces=false @@ -206,8 +206,8 @@ org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow=16 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon=0 org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 @@ -216,6 +216,7 @@ org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_record_components=16 org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 @@ -226,7 +227,7 @@ org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow=20 +org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow=0 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_type_annotations=0 @@ -278,6 +279,7 @@ org.eclipse.jdt.core.formatter.comment.indent_tag_description=false org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags=false org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true diff --git a/jfxui/.settings/org.eclipse.jdt.ui.prefs b/jfxui/.settings/org.eclipse.jdt.ui.prefs index 30d6ee91..3189937e 100644 --- a/jfxui/.settings/org.eclipse.jdt.ui.prefs +++ b/jfxui/.settings/org.eclipse.jdt.ui.prefs @@ -1,7 +1,7 @@ eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_itsallcode style -formatter_settings_version=22 +formatter_settings_version=23 org.eclipse.jdt.ui.ignorelowercasenames=true org.eclipse.jdt.ui.importorder=java;javax;org;com; org.eclipse.jdt.ui.ondemandthreshold=99 diff --git a/jfxui/src/main/java/org/itsallcode/whiterabbit/jfxui/JavaFxApp.java b/jfxui/src/main/java/org/itsallcode/whiterabbit/jfxui/JavaFxApp.java index 27192d3a..ef57213c 100644 --- a/jfxui/src/main/java/org/itsallcode/whiterabbit/jfxui/JavaFxApp.java +++ b/jfxui/src/main/java/org/itsallcode/whiterabbit/jfxui/JavaFxApp.java @@ -2,11 +2,7 @@ import java.lang.ProcessHandle.Info; import java.nio.file.Paths; -import java.time.Clock; -import java.time.Duration; -import java.time.Instant; -import java.time.LocalTime; -import java.time.YearMonth; +import java.time.*; import java.util.Arrays; import java.util.Optional; import java.util.concurrent.ScheduledExecutorService; @@ -21,13 +17,8 @@ import org.itsallcode.whiterabbit.jfxui.ui.AppUi; import org.itsallcode.whiterabbit.jfxui.ui.InterruptionDialog; import org.itsallcode.whiterabbit.jfxui.uistate.UiStateService; -import org.itsallcode.whiterabbit.logic.Config; -import org.itsallcode.whiterabbit.logic.ConfigLoader; -import org.itsallcode.whiterabbit.logic.DefaultWorkingDirProvider; -import org.itsallcode.whiterabbit.logic.WorkingDirProvider; -import org.itsallcode.whiterabbit.logic.model.Activity; -import org.itsallcode.whiterabbit.logic.model.DayRecord; -import org.itsallcode.whiterabbit.logic.model.MonthIndex; +import org.itsallcode.whiterabbit.logic.*; +import org.itsallcode.whiterabbit.logic.model.*; import org.itsallcode.whiterabbit.logic.service.AppService; import org.itsallcode.whiterabbit.logic.service.AppServiceCallback; import org.itsallcode.whiterabbit.logic.service.singleinstance.OtherInstance; @@ -287,8 +278,17 @@ public InterruptionDetectedDecision automaticInterruptionDetected(LocalTime star private InterruptionDetectedDecision showAutomaticInterruptionDialog(LocalTime startOfInterruption, Duration interruption) { + final Alert alert = createAlertDialog(startOfInterruption, interruption); LOG.info("Showing automatic interruption alert starting at {} for {}...", startOfInterruption, interruption); + final Optional selectedButton = alert.showAndWait(); + final InterruptionDetectedDecision decision = evaluateButton(selectedButton); + LOG.info("User clicked button {} -> {}", selectedButton, decision); + return decision; + } + + private Alert createAlertDialog(LocalTime startOfInterruption, Duration interruption) + { final Alert alert = new Alert(AlertType.CONFIRMATION); alert.setTitle("Interruption detected"); alert.initModality(Modality.NONE); @@ -299,11 +299,7 @@ private InterruptionDetectedDecision showAutomaticInterruptionDialog(LocalTime s final ButtonType skipInterruption = new ButtonType("Skip interruption", ButtonData.NO); final ButtonType stopWorkForToday = new ButtonType("Stop working for today", ButtonData.FINISH); alert.getButtonTypes().setAll(addInterruption, skipInterruption, stopWorkForToday); - final Optional selectedButton = alert.showAndWait(); - - final InterruptionDetectedDecision decision = evaluateButton(selectedButton); - LOG.info("User clicked button {} -> {}", selectedButton, decision); - return decision; + return alert; } private InterruptionDetectedDecision evaluateButton(final Optional selectedButton) diff --git a/jfxui/src/uiTest/java/org/itsallcode/whiterabbit/jfxui/AutomaticInterruptionTest.java b/jfxui/src/uiTest/java/org/itsallcode/whiterabbit/jfxui/AutomaticInterruptionTest.java index 5e5b5795..7e06511d 100644 --- a/jfxui/src/uiTest/java/org/itsallcode/whiterabbit/jfxui/AutomaticInterruptionTest.java +++ b/jfxui/src/uiTest/java/org/itsallcode/whiterabbit/jfxui/AutomaticInterruptionTest.java @@ -37,6 +37,31 @@ static void shutdownExecutorService() executorService = null; } + @Disabled("https://github.com/itsallcode/white-rabbit/issues/264") + @Test + void duplicateInterruptionDialog() + { + time().tickMinute(); + + interruptionStart = time().getCurrentTimeMinutes(); + executorService.submit(() -> { + time().tickMinute(Duration.ofMinutes(5)); + time().tickMinute(Duration.ofMinutes(10)); + }); + TestUtil.sleepLong(); + interruptionEnd = time().getCurrentTimeMinutes(); + + final AutomaticInterruptionDialog interruptionDialog = app().assertAutomaticInterruption(); + + interruptionDialog.assertLabel(interruptionStart, Duration.ofMinutes(5)); + ((Consumer) dialog -> dialog.clickAddInterruption()).accept(interruptionDialog); + + TestUtil.sleepShort(); + app().assertNoAutomaticInterruption(); + + assertDay(Duration.ofMinutes(5), interruptionStart, interruptionEnd); + } + @Test void skipInterruptionButtonDoesNotAddInterruption() { diff --git a/jfxui/src/uiTest/java/org/itsallcode/whiterabbit/jfxui/testutil/model/ApplicationHelper.java b/jfxui/src/uiTest/java/org/itsallcode/whiterabbit/jfxui/testutil/model/ApplicationHelper.java index 2a9cd782..8994e517 100644 --- a/jfxui/src/uiTest/java/org/itsallcode/whiterabbit/jfxui/testutil/model/ApplicationHelper.java +++ b/jfxui/src/uiTest/java/org/itsallcode/whiterabbit/jfxui/testutil/model/ApplicationHelper.java @@ -66,6 +66,12 @@ public AutomaticInterruptionDialog assertAutomaticInterruption() return new AutomaticInterruptionDialog(robot, window); } + public void assertNoAutomaticInterruption() + { + final Window window = robot.window("Interruption detected"); + Assertions.assertThat(window).isNotShowing(); + } + public AboutDialogWindow openAboutDialog() { robot.clickOn("#menu_help").clickOn("#menuitem_about"); diff --git a/logic/.settings/org.eclipse.jdt.core.prefs b/logic/.settings/org.eclipse.jdt.core.prefs index 6e032f17..22f3f2d1 100644 --- a/logic/.settings/org.eclipse.jdt.core.prefs +++ b/logic/.settings/org.eclipse.jdt.core.prefs @@ -42,9 +42,9 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature=do not generate org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.shareCommonFinallyBlocks=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -169,7 +169,7 @@ org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.processAnnotations=disabled org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.compiler.storeAnnotations=disabled org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL @@ -178,7 +178,7 @@ org.eclipse.jdt.core.computeJavaBuildOrder=ignore org.eclipse.jdt.core.encoding=utf8 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 -org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=true +org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=false org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false org.eclipse.jdt.core.formatter.align_with_spaces=false @@ -206,8 +206,8 @@ org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow=16 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon=0 org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 @@ -216,6 +216,7 @@ org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_record_components=16 org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 @@ -226,7 +227,7 @@ org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow=20 +org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow=0 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_type_annotations=0 @@ -278,6 +279,7 @@ org.eclipse.jdt.core.formatter.comment.indent_tag_description=false org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags=false org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true diff --git a/logic/.settings/org.eclipse.jdt.ui.prefs b/logic/.settings/org.eclipse.jdt.ui.prefs index 30d6ee91..3189937e 100644 --- a/logic/.settings/org.eclipse.jdt.ui.prefs +++ b/logic/.settings/org.eclipse.jdt.ui.prefs @@ -1,7 +1,7 @@ eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_itsallcode style -formatter_settings_version=22 +formatter_settings_version=23 org.eclipse.jdt.ui.ignorelowercasenames=true org.eclipse.jdt.ui.importorder=java;javax;org;com; org.eclipse.jdt.ui.ondemandthreshold=99 diff --git a/logic/src/main/java/org/itsallcode/whiterabbit/logic/service/DelegatingAppServiceCallback.java b/logic/src/main/java/org/itsallcode/whiterabbit/logic/service/DelegatingAppServiceCallback.java index 71186fb5..9d6e8e89 100644 --- a/logic/src/main/java/org/itsallcode/whiterabbit/logic/service/DelegatingAppServiceCallback.java +++ b/logic/src/main/java/org/itsallcode/whiterabbit/logic/service/DelegatingAppServiceCallback.java @@ -27,7 +27,7 @@ public void recordUpdated(DayRecord dayRecord) } else { - throw new IllegalStateException(); + throw noDelegateRegistered(); } } @@ -41,7 +41,7 @@ public InterruptionDetectedDecision automaticInterruptionDetected(LocalTime star } else { - throw new IllegalStateException(); + throw noDelegateRegistered(); } } @@ -67,7 +67,12 @@ public void workStoppedForToday(boolean stopWorking) } else { - throw new IllegalStateException(); + throw noDelegateRegistered(); } } + + private RuntimeException noDelegateRegistered() + { + return new IllegalStateException("No delegate registered"); + } } diff --git a/logic/src/main/java/org/itsallcode/whiterabbit/logic/service/scheduling/OtherThreadRunnable.java b/logic/src/main/java/org/itsallcode/whiterabbit/logic/service/scheduling/OtherThreadRunnable.java index f3412cca..cb01f1d6 100644 --- a/logic/src/main/java/org/itsallcode/whiterabbit/logic/service/scheduling/OtherThreadRunnable.java +++ b/logic/src/main/java/org/itsallcode/whiterabbit/logic/service/scheduling/OtherThreadRunnable.java @@ -18,4 +18,10 @@ public void run() { executorService.execute(delegate); } + + @Override + public String toString() + { + return "OtherThreadRunnable [executorService=" + executorService + ", delegate=" + delegate + "]"; + } } diff --git a/logic/src/main/java/org/itsallcode/whiterabbit/logic/service/scheduling/ReschedulingRunnable.java b/logic/src/main/java/org/itsallcode/whiterabbit/logic/service/scheduling/ReschedulingRunnable.java index ba8f1c33..b58bd2c6 100644 --- a/logic/src/main/java/org/itsallcode/whiterabbit/logic/service/scheduling/ReschedulingRunnable.java +++ b/logic/src/main/java/org/itsallcode/whiterabbit/logic/service/scheduling/ReschedulingRunnable.java @@ -4,9 +4,7 @@ import java.time.Instant; import java.util.Objects; import java.util.Optional; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.TimeUnit; +import java.util.concurrent.*; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -54,6 +52,7 @@ ScheduledTaskFuture schedule() } if (!executorService.isShutdown()) { + LOG.trace("Schedule next execution of {} in {}", trigger, delay); this.currentFuture = this.executorService.schedule(this, delay.toMillis(), TimeUnit.MILLISECONDS); } return this; @@ -66,6 +65,7 @@ public void run() final Instant actualExecutionTime = clock.instant(); runCommand(); final Instant completionTime = clock.instant(); + LOG.trace("Command {} finished in {}", command, Duration.between(actualExecutionTime, completionTime)); synchronized (this.triggerContextMonitor) { Objects.requireNonNull(this.scheduledExecutionTime, "No scheduled execution"); diff --git a/logic/src/test/java/org/itsallcode/whiterabbit/logic/service/DelegatingAppServiceCallbackTest.java b/logic/src/test/java/org/itsallcode/whiterabbit/logic/service/DelegatingAppServiceCallbackTest.java new file mode 100644 index 00000000..65fed06f --- /dev/null +++ b/logic/src/test/java/org/itsallcode/whiterabbit/logic/service/DelegatingAppServiceCallbackTest.java @@ -0,0 +1,102 @@ +package org.itsallcode.whiterabbit.logic.service; + +import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.mockito.ArgumentMatchers.same; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; + +import java.time.Duration; +import java.time.LocalTime; + +import org.itsallcode.whiterabbit.logic.model.DayRecord; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +class DelegatingAppServiceCallbackTest +{ + @Mock + AppServiceCallback delegateMock; + + @Test + void recordUpdatedNoDelegate() + { + DelegatingAppServiceCallback callback = testee(); + assertThatThrownBy(() -> callback.recordUpdated(null)).isInstanceOf(IllegalStateException.class) + .hasMessage("No delegate registered"); + } + + @Test + void recordUpdated() + { + DelegatingAppServiceCallback callback = testeeWithDelegate(); + DayRecord record = mock(DayRecord.class); + callback.recordUpdated(record); + verify(delegateMock).recordUpdated(same(record)); + } + + @Test + void automaticInterruptionDetectedNoDelegate() + { + DelegatingAppServiceCallback callback = testee(); + assertThatThrownBy(() -> callback.automaticInterruptionDetected(null, null)) + .isInstanceOf(IllegalStateException.class) + .hasMessage("No delegate registered"); + } + + @Test + void automaticInterruptionDetected() + { + DelegatingAppServiceCallback callback = testeeWithDelegate(); + callback.automaticInterruptionDetected(LocalTime.of(8, 30), Duration.ofMinutes(15)); + verify(delegateMock).automaticInterruptionDetected(LocalTime.of(8, 30), Duration.ofMinutes(15)); + } + + @Test + void exceptionOccurredNoDelegateIgnoresError() + { + DelegatingAppServiceCallback callback = testee(); + assertDoesNotThrow(() -> callback.exceptionOccurred(new RuntimeException("mock"))); + } + + @Test + void exceptionOccurred() + { + DelegatingAppServiceCallback callback = testeeWithDelegate(); + RuntimeException exception = new RuntimeException("mock"); + callback.exceptionOccurred(exception); + verify(delegateMock).exceptionOccurred(same(exception)); + } + + @Test + void workStoppedForTodayNoDelegate() + { + DelegatingAppServiceCallback callback = testee(); + assertThatThrownBy(() -> callback.workStoppedForToday(true)) + .isInstanceOf(IllegalStateException.class) + .hasMessage("No delegate registered"); + } + + @Test + void workStoppedForToday() + { + DelegatingAppServiceCallback callback = testeeWithDelegate(); + callback.workStoppedForToday(true); + verify(delegateMock).workStoppedForToday(true); + } + + DelegatingAppServiceCallback testee() + { + return new DelegatingAppServiceCallback(); + } + + DelegatingAppServiceCallback testeeWithDelegate() + { + DelegatingAppServiceCallback callback = new DelegatingAppServiceCallback(); + callback.setDelegate(delegateMock); + return callback; + } +} diff --git a/logic/src/test/java/org/itsallcode/whiterabbit/logic/service/scheduling/OtherThreadRunnableTest.java b/logic/src/test/java/org/itsallcode/whiterabbit/logic/service/scheduling/OtherThreadRunnableTest.java index 361d928d..882a288e 100644 --- a/logic/src/test/java/org/itsallcode/whiterabbit/logic/service/scheduling/OtherThreadRunnableTest.java +++ b/logic/src/test/java/org/itsallcode/whiterabbit/logic/service/scheduling/OtherThreadRunnableTest.java @@ -11,13 +11,15 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import com.jparams.verifier.tostring.ToStringVerifier; + @ExtendWith(MockitoExtension.class) class OtherThreadRunnableTest { @Mock - private ExecutorService executorServiceMock; + ExecutorService executorServiceMock; @Mock - private Runnable delegateMock; + Runnable delegateMock; private OtherThreadRunnable otherThreadRunnable; @@ -28,9 +30,15 @@ void setUp() } @Test - void test() + void run() { otherThreadRunnable.run(); verify(executorServiceMock).execute(same(delegateMock)); } + + @Test + void testToString() + { + ToStringVerifier.forClass(OtherThreadRunnable.class).verify(); + } } diff --git a/plugins/.settings/org.eclipse.jdt.core.prefs b/plugins/.settings/org.eclipse.jdt.core.prefs index 41adb2c1..bf72cbac 100644 --- a/plugins/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/.settings/org.eclipse.jdt.core.prefs @@ -42,9 +42,9 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature=do not generate org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.shareCommonFinallyBlocks=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -169,7 +169,7 @@ org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.processAnnotations=disabled org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.compiler.storeAnnotations=disabled org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL diff --git a/plugins/csv/.settings/org.eclipse.jdt.core.prefs b/plugins/csv/.settings/org.eclipse.jdt.core.prefs index 6c3a7e6a..ee52ae3d 100644 --- a/plugins/csv/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/csv/.settings/org.eclipse.jdt.core.prefs @@ -42,9 +42,9 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature=do not generate org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.shareCommonFinallyBlocks=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -169,7 +169,7 @@ org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.processAnnotations=disabled org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.compiler.storeAnnotations=disabled org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL @@ -216,6 +216,7 @@ org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_record_components=16 org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 @@ -278,6 +279,7 @@ org.eclipse.jdt.core.formatter.comment.indent_tag_description=false org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags=false org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true diff --git a/plugins/csv/.settings/org.eclipse.jdt.ui.prefs b/plugins/csv/.settings/org.eclipse.jdt.ui.prefs index 30d6ee91..3189937e 100644 --- a/plugins/csv/.settings/org.eclipse.jdt.ui.prefs +++ b/plugins/csv/.settings/org.eclipse.jdt.ui.prefs @@ -1,7 +1,7 @@ eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_itsallcode style -formatter_settings_version=22 +formatter_settings_version=23 org.eclipse.jdt.ui.ignorelowercasenames=true org.eclipse.jdt.ui.importorder=java;javax;org;com; org.eclipse.jdt.ui.ondemandthreshold=99 diff --git a/plugins/demo/.settings/org.eclipse.jdt.core.prefs b/plugins/demo/.settings/org.eclipse.jdt.core.prefs index b0b5fdb6..ee52ae3d 100644 --- a/plugins/demo/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/demo/.settings/org.eclipse.jdt.core.prefs @@ -42,9 +42,9 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature=do not generate org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.shareCommonFinallyBlocks=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -169,7 +169,7 @@ org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.processAnnotations=disabled org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.compiler.storeAnnotations=disabled org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL @@ -178,7 +178,7 @@ org.eclipse.jdt.core.computeJavaBuildOrder=ignore org.eclipse.jdt.core.encoding=utf8 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 -org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=true +org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=false org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false org.eclipse.jdt.core.formatter.align_with_spaces=false @@ -206,8 +206,8 @@ org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow=16 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon=0 org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 @@ -216,6 +216,7 @@ org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_record_components=16 org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 @@ -226,7 +227,7 @@ org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow=20 +org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow=0 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_type_annotations=0 @@ -278,6 +279,7 @@ org.eclipse.jdt.core.formatter.comment.indent_tag_description=false org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags=false org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true diff --git a/plugins/demo/.settings/org.eclipse.jdt.ui.prefs b/plugins/demo/.settings/org.eclipse.jdt.ui.prefs index 30d6ee91..3189937e 100644 --- a/plugins/demo/.settings/org.eclipse.jdt.ui.prefs +++ b/plugins/demo/.settings/org.eclipse.jdt.ui.prefs @@ -1,7 +1,7 @@ eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_itsallcode style -formatter_settings_version=22 +formatter_settings_version=23 org.eclipse.jdt.ui.ignorelowercasenames=true org.eclipse.jdt.ui.importorder=java;javax;org;com; org.eclipse.jdt.ui.ondemandthreshold=99 diff --git a/plugins/holiday-calculator/.settings/org.eclipse.jdt.core.prefs b/plugins/holiday-calculator/.settings/org.eclipse.jdt.core.prefs index 6c3a7e6a..ee52ae3d 100644 --- a/plugins/holiday-calculator/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/holiday-calculator/.settings/org.eclipse.jdt.core.prefs @@ -42,9 +42,9 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature=do not generate org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.shareCommonFinallyBlocks=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -169,7 +169,7 @@ org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.processAnnotations=disabled org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.compiler.source=21 org.eclipse.jdt.core.compiler.storeAnnotations=disabled org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL @@ -216,6 +216,7 @@ org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_record_components=16 org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 @@ -278,6 +279,7 @@ org.eclipse.jdt.core.formatter.comment.indent_tag_description=false org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags=false org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true diff --git a/plugins/holiday-calculator/.settings/org.eclipse.jdt.ui.prefs b/plugins/holiday-calculator/.settings/org.eclipse.jdt.ui.prefs index 30d6ee91..3189937e 100644 --- a/plugins/holiday-calculator/.settings/org.eclipse.jdt.ui.prefs +++ b/plugins/holiday-calculator/.settings/org.eclipse.jdt.ui.prefs @@ -1,7 +1,7 @@ eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_itsallcode style -formatter_settings_version=22 +formatter_settings_version=23 org.eclipse.jdt.ui.ignorelowercasenames=true org.eclipse.jdt.ui.importorder=java;javax;org;com; org.eclipse.jdt.ui.ondemandthreshold=99 diff --git a/settings.gradle b/settings.gradle index bf42fe87..56b1818c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -19,28 +19,29 @@ dependencyResolutionManagement { } versionCatalogs { libs { - version('junitJupiter', '5.10.0') - version('mockito', '5.5.0') - version('log4j', '2.20.0') - version('javafx', '20-ea+9') // Versions >= 20-ea+11 and 20 causes UI-Test failures in non-headless mode (-PuiTestsHeadless=false) + version('junitJupiter', '5.10.1') + version('mockito', '5.9.0') + version('log4j', '2.22.1') + version('javafx', '22-ea+16') // Versions >= 20-ea+11 and 20 causes UI-Test failures in non-headless mode (-PuiTestsHeadless=false) library('junitParams', 'org.junit.jupiter', 'junit-jupiter-params').versionRef('junitJupiter') - library('assertj', 'org.assertj:assertj-core:3.24.2') - library('junitPioneer', 'org.junit-pioneer:junit-pioneer:2.1.0') - library('equalsverifier', 'nl.jqno.equalsverifier:equalsverifier:3.15.1') + library('assertj', 'org.assertj:assertj-core:3.25.1') + library('junitPioneer', 'org.junit-pioneer:junit-pioneer:2.2.0') + library('equalsverifier', 'nl.jqno.equalsverifier:equalsverifier:3.15.6') + library('tostringverifier', 'com.jparams:to-string-verifier:1.4.8') library('hamcrest', 'org.hamcrest:hamcrest-all:1.3') library('mockito', 'org.mockito', 'mockito-core').versionRef('mockito') library('mocktioJunit', 'org.mockito', 'mockito-junit-jupiter').versionRef('mockito') - bundle('testUtils', ['assertj', 'junitPioneer', 'junitParams', 'equalsverifier', 'hamcrest', 'mockito', 'mocktioJunit']) + bundle('testUtils', ['assertj', 'junitPioneer', 'junitParams', 'equalsverifier', 'tostringverifier', 'hamcrest', 'mockito', 'mocktioJunit']) - library('testfx', 'org.testfx:testfx-junit5:4.0.16-alpha') - library('monocle', 'org.testfx:openjfx-monocle:jdk-12.0.1+2') + library('testfx', 'org.testfx:testfx-junit5:4.0.17') + library('monocle', 'org.pdfsam:javafx-monocle:21') library('jsonBindApi', 'jakarta.json.bind:jakarta.json.bind-api:3.0.0') library('yasson', 'org.eclipse:yasson:3.0.3') - library('jdtAnnotations', 'org.eclipse.jdt:org.eclipse.jdt.annotation:2.2.700') - library('jansi', 'org.fusesource.jansi:jansi:2.4.0') + library('jdtAnnotations', 'org.eclipse.jdt:org.eclipse.jdt.annotation:2.2.800') + library('jansi', 'org.fusesource.jansi:jansi:2.4.1') library('log4j.api', 'org.apache.logging.log4j', 'log4j-api').versionRef('log4j') library('log4j.core', 'org.apache.logging.log4j', 'log4j-core').versionRef('log4j') library('log4j.jul', 'org.apache.logging.log4j', 'log4j-jul').versionRef('log4j')