From 8a1c7673665b415904322971b1dcc6e01dcbf6bd Mon Sep 17 00:00:00 2001 From: HARPER Jon Date: Mon, 28 Aug 2023 17:06:45 +0200 Subject: [PATCH] Upgrade all runtime dependencies to the most recent version The following remains and is left as is (I did a manual check that there was nothing better available) $ mvn versions:display-dependency-updates [INFO] com.google.code.findbugs:annotations ................ 3.0.1 -> 3.0.1u2 [INFO] com.powsybl:powsybl-build-tools ............................. 13 -> 14 [INFO] org.apache.groovy:groovy ..................... 4.0.14 -> 5.0.0-alpha-2 [INFO] org.apache.groovy:groovy-console ............. 4.0.14 -> 5.0.0-alpha-2 [INFO] org.apache.groovy:groovy-groovysh ............ 4.0.14 -> 5.0.0-alpha-2 [INFO] org.apache.groovy:groovy-nio ................. 4.0.14 -> 5.0.0-alpha-2 [INFO] org.apache.maven:maven-core ................... 3.8.5 -> 4.0.0-alpha-7 [INFO] org.eclipse.rdf4j:rdf4j-common-transaction ......... 4.3.6 -> 5.0.0-M1 [INFO] org.eclipse.rdf4j:rdf4j-repository-sail ............ 4.3.6 -> 5.0.0-M1 [INFO] org.eclipse.rdf4j:rdf4j-rio-rdfxml ................. 4.3.6 -> 5.0.0-M1 [INFO] org.eclipse.rdf4j:rdf4j-sail-memory ................ 4.3.6 -> 5.0.0-M1 TODO: there's at least one relocation I know of that I didn't handle: findbugs -> spotbugs TODO: are there other relocations ? Signed-off-by: HARPER Jon --- action/action-dsl-spi/pom.xml | 2 +- action/action-dsl/pom.xml | 2 +- action/action-util/pom.xml | 2 +- .../test/TestPlatformConfigProvider.java | 6 +- dsl/pom.xml | 2 +- .../dynamic-simulation-dsl/pom.xml | 2 +- .../powsybl/ieeecdf/model/IeeeCdfBranch.java | 7 +- .../com/powsybl/ieeecdf/model/IeeeCdfBus.java | 5 +- .../powsybl/ieeecdf/model/IeeeCdfTitle.java | 2 +- .../ieeecdf/model/SeasonConversion.java | 19 ++---- iidm/iidm-scripting/pom.xml | 2 +- pom.xml | 64 +++++++++---------- scripting/pom.xml | 4 +- .../tools/SecurityAnalysisToolTest.java | 6 +- time-series/time-series-dsl/pom.xml | 2 +- 15 files changed, 59 insertions(+), 68 deletions(-) diff --git a/action/action-dsl-spi/pom.xml b/action/action-dsl-spi/pom.xml index 4b98a1fcbde..b6aa2cff3f7 100644 --- a/action/action-dsl-spi/pom.xml +++ b/action/action-dsl-spi/pom.xml @@ -41,7 +41,7 @@ - org.codehaus.groovy + org.apache.groovy groovy diff --git a/action/action-dsl/pom.xml b/action/action-dsl/pom.xml index 60c7d87e700..b3fc3b4cedb 100644 --- a/action/action-dsl/pom.xml +++ b/action/action-dsl/pom.xml @@ -49,7 +49,7 @@ commons-io - org.codehaus.groovy + org.apache.groovy groovy diff --git a/action/action-util/pom.xml b/action/action-util/pom.xml index 7a19352d6a7..ba7d45aba03 100644 --- a/action/action-util/pom.xml +++ b/action/action-util/pom.xml @@ -45,7 +45,7 @@ - org.codehaus.groovy + org.apache.groovy groovy diff --git a/config-test/src/main/java/com/powsybl/config/test/TestPlatformConfigProvider.java b/config-test/src/main/java/com/powsybl/config/test/TestPlatformConfigProvider.java index ada10671915..344944f179d 100644 --- a/config-test/src/main/java/com/powsybl/config/test/TestPlatformConfigProvider.java +++ b/config-test/src/main/java/com/powsybl/config/test/TestPlatformConfigProvider.java @@ -61,11 +61,7 @@ public PlatformConfig getPlatformConfig() { InputStream resourceList = TestPlatformConfigProvider.class.getResourceAsStream(FILELIST_PATH); List resources; if (resourceList != null) { - try { - resources = IOUtils.readLines(resourceList, StandardCharsets.UTF_8); - } catch (IOException e) { - throw new UncheckedIOException(e); - } + resources = IOUtils.readLines(resourceList, StandardCharsets.UTF_8); } else { resources = Collections.emptyList(); } diff --git a/dsl/pom.xml b/dsl/pom.xml index 29062d6f9f7..f9044341939 100644 --- a/dsl/pom.xml +++ b/dsl/pom.xml @@ -47,7 +47,7 @@ commons-io - org.codehaus.groovy + org.apache.groovy groovy diff --git a/dynamic-simulation/dynamic-simulation-dsl/pom.xml b/dynamic-simulation/dynamic-simulation-dsl/pom.xml index cef2c5fbadf..9fa70d7e5df 100644 --- a/dynamic-simulation/dynamic-simulation-dsl/pom.xml +++ b/dynamic-simulation/dynamic-simulation-dsl/pom.xml @@ -43,7 +43,7 @@ - org.codehaus.groovy + org.apache.groovy groovy diff --git a/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/IeeeCdfBranch.java b/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/IeeeCdfBranch.java index b11b7fc1190..2efbde69301 100644 --- a/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/IeeeCdfBranch.java +++ b/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/IeeeCdfBranch.java @@ -6,9 +6,10 @@ */ package com.powsybl.ieeecdf.model; -import com.univocity.parsers.annotations.Convert; +import com.univocity.parsers.annotations.EnumOptions; import com.univocity.parsers.annotations.FixedWidth; import com.univocity.parsers.annotations.Parsed; +import com.univocity.parsers.conversions.EnumSelector; import com.univocity.parsers.fixed.FieldAlignment; /** @@ -117,7 +118,7 @@ public enum Side { */ @FixedWidth(from = 18, to = 19) @Parsed - @Convert(conversionClass = BranchTypeConversion.class) + @EnumOptions(selectors = EnumSelector.ORDINAL) private Type type; /** @@ -174,7 +175,7 @@ public enum Side { */ @FixedWidth(from = 73, to = 74, alignment = FieldAlignment.RIGHT) @Parsed - @Convert(conversionClass = BranchSideConversion.class) + @EnumOptions(selectors = EnumSelector.ORDINAL) private Side side; /** diff --git a/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/IeeeCdfBus.java b/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/IeeeCdfBus.java index 99c9db50482..150e2d91038 100644 --- a/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/IeeeCdfBus.java +++ b/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/IeeeCdfBus.java @@ -6,9 +6,10 @@ */ package com.powsybl.ieeecdf.model; -import com.univocity.parsers.annotations.Convert; +import com.univocity.parsers.annotations.EnumOptions; import com.univocity.parsers.annotations.FixedWidth; import com.univocity.parsers.annotations.Parsed; +import com.univocity.parsers.conversions.EnumSelector; import com.univocity.parsers.fixed.FieldAlignment; /** @@ -91,7 +92,7 @@ public enum Type { */ @FixedWidth(from = 24, to = 26, alignment = FieldAlignment.RIGHT) @Parsed - @Convert(conversionClass = BusTypeConversion.class) + @EnumOptions(selectors = EnumSelector.ORDINAL) private Type type; /** diff --git a/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/IeeeCdfTitle.java b/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/IeeeCdfTitle.java index e460c5d0aee..bf162d16290 100644 --- a/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/IeeeCdfTitle.java +++ b/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/IeeeCdfTitle.java @@ -68,7 +68,7 @@ public enum Season { * Season */ @FixedWidth(from = 43, to = 44) - @Parsed + @Parsed(applyDefaultConversion = false) @Convert(conversionClass = SeasonConversion.class) private Season season; diff --git a/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/SeasonConversion.java b/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/SeasonConversion.java index 809b2e1aac7..fb5bc3dafbd 100644 --- a/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/SeasonConversion.java +++ b/ieee-cdf/ieee-cdf-model/src/main/java/com/powsybl/ieeecdf/model/SeasonConversion.java @@ -11,30 +11,23 @@ /** * @author Geoffroy Jamgotchian */ -public class SeasonConversion extends ObjectConversion { +public class SeasonConversion extends ObjectConversion { @Override - protected IeeeCdfTitle.Season fromString(String str) { + protected String fromString(String str) { char season = str.charAt(0); switch (season) { case 'S': - return IeeeCdfTitle.Season.SUMMER; + return IeeeCdfTitle.Season.SUMMER.name(); case 'W': - return IeeeCdfTitle.Season.WINTER; + return IeeeCdfTitle.Season.WINTER.name(); default: throw new IllegalStateException("Unknown season: " + season); } } @Override - public String revert(IeeeCdfTitle.Season season) { - switch (season) { - case SUMMER: - return "S"; - case WINTER: - return "W"; - default: - throw new IllegalStateException("Unknown season: " + season); - } + public String revert(String str) { + return str.substring(0, 1); } } diff --git a/iidm/iidm-scripting/pom.xml b/iidm/iidm-scripting/pom.xml index 6d85c27a9d9..488725081a9 100644 --- a/iidm/iidm-scripting/pom.xml +++ b/iidm/iidm-scripting/pom.xml @@ -45,7 +45,7 @@ - org.codehaus.groovy + org.apache.groovy groovy diff --git a/pom.xml b/pom.xml index 808cf28caf9..7411cc45eba 100644 --- a/pom.xml +++ b/pom.xml @@ -95,48 +95,48 @@ ../../../distribution-core/target/site/jacoco-aggregate/jacoco.xml - 3.11.0 - 1.0-rc2 - 1.3.1 - 1.21 - 2.8.0 - 2.7 - 3.4 + 3.24.2 + 1.1.1 + 1.5.0 + 1.24.0 + 2.9.0 + 2.13.0 + 3.13.0 3.6.1 1.10.0 3.0.1 3.0.2 - 1.41.1_1 + 1.47.1_1 1.0.12 - 3.0.15 - 32.0.1-jre - 2.14.1 - 2.14.1 + 4.0.14 + 32.1.2-jre + 2.15.2 + 2.15.2 1.0.3 - 1.5.1 - 1.1 - 2.9.7 - 5.5.2 - 1.2.10 + 1.5.2 + 1.3.0 + 2.12.5 + 5.10.0 + 1.4.11 3.8.5 - 3.6.0 - 0.5.9 - 5.1.1 + 3.9.0 + 0.5.15 + 5.5.0 2.4.0 5.2.3 - 4.2.2 + 4.3.6 1.0 - 1.7.22 - 2.0 + 2.0.9 + 2.2 20070216 4.3.4 - 1.17.6 - 1.5.0 + 1.19.0 + 1.7.2 3.0.3 - 2.8.3 - 2.3.0 + 2.9.1 + 2.9.1 1.9 - 1.5.2-5 + 1.5.5-5 1.2.1 @@ -766,22 +766,22 @@ ${gdata.version} - org.codehaus.groovy + org.apache.groovy groovy ${groovy.version} - org.codehaus.groovy + org.apache.groovy groovy-console ${groovy.version} - org.codehaus.groovy + org.apache.groovy groovy-groovysh ${groovy.version} - org.codehaus.groovy + org.apache.groovy groovy-nio ${groovy.version} diff --git a/scripting/pom.xml b/scripting/pom.xml index 04387ebab50..e78a4744cdc 100644 --- a/scripting/pom.xml +++ b/scripting/pom.xml @@ -45,7 +45,7 @@ - org.codehaus.groovy + org.apache.groovy groovy @@ -65,7 +65,7 @@ - org.codehaus.groovy + org.apache.groovy groovy-nio runtime diff --git a/security-analysis/security-analysis-api/src/test/java/com/powsybl/security/tools/SecurityAnalysisToolTest.java b/security-analysis/security-analysis-api/src/test/java/com/powsybl/security/tools/SecurityAnalysisToolTest.java index 228cfbb2b93..055c2037281 100644 --- a/security-analysis/security-analysis-api/src/test/java/com/powsybl/security/tools/SecurityAnalysisToolTest.java +++ b/security-analysis/security-analysis-api/src/test/java/com/powsybl/security/tools/SecurityAnalysisToolTest.java @@ -98,14 +98,14 @@ void test() { private static CommandLine mockCommandLine(Map options, Set flags) { CommandLine cli = mock(CommandLine.class); - when(cli.hasOption(any())).thenReturn(false); - when(cli.getOptionValue(any())).thenReturn(null); + when(cli.hasOption(anyString())).thenReturn(false); + when(cli.getOptionValue(anyString())).thenReturn(null); options.forEach((k, v) -> { when(cli.getOptionValue(k)).thenReturn(v); when(cli.hasOption(k)).thenReturn(true); }); flags.forEach(f -> when(cli.hasOption(f)).thenReturn(true)); - when(cli.getOptionProperties(any())).thenReturn(new Properties()); + when(cli.getOptionProperties(anyString())).thenReturn(new Properties()); return cli; } diff --git a/time-series/time-series-dsl/pom.xml b/time-series/time-series-dsl/pom.xml index b71617e41c4..137a6e0c8c4 100644 --- a/time-series/time-series-dsl/pom.xml +++ b/time-series/time-series-dsl/pom.xml @@ -45,7 +45,7 @@ - org.codehaus.groovy + org.apache.groovy groovy