From 41d483d272684e2b5b58d7e0e1d36029b4a9be7f Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Sat, 28 Sep 2024 23:57:47 +0200 Subject: [PATCH] Wrong method --- .../components/secdispatcher/internal/DefaultSecDispatcher.java | 2 +- .../plexus/components/secdispatcher/internal/SecUtil.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/codehaus/plexus/components/secdispatcher/internal/DefaultSecDispatcher.java b/src/main/java/org/codehaus/plexus/components/secdispatcher/internal/DefaultSecDispatcher.java index e1b356d..44f6131 100644 --- a/src/main/java/org/codehaus/plexus/components/secdispatcher/internal/DefaultSecDispatcher.java +++ b/src/main/java/org/codehaus/plexus/components/secdispatcher/internal/DefaultSecDispatcher.java @@ -120,7 +120,7 @@ public String decrypt(String str) throws SecDispatcherException { @Override public SettingsSecurity readConfiguration(boolean createIfMissing) throws IOException { - SettingsSecurity configuration = getConfiguration(false); + SettingsSecurity configuration = SecUtil.read(getConfigurationPath()); if (configuration == null && createIfMissing) { configuration = new SettingsSecurity(); } diff --git a/src/main/java/org/codehaus/plexus/components/secdispatcher/internal/SecUtil.java b/src/main/java/org/codehaus/plexus/components/secdispatcher/internal/SecUtil.java index 5e77adb..89440e6 100644 --- a/src/main/java/org/codehaus/plexus/components/secdispatcher/internal/SecUtil.java +++ b/src/main/java/org/codehaus/plexus/components/secdispatcher/internal/SecUtil.java @@ -111,7 +111,7 @@ private static void writeFile(Path target, SettingsSecurity configuration, boole Path tempFile = parent.resolve(target.getFileName() + "." + Long.toUnsignedString(ThreadLocalRandom.current().nextLong()) + ".tmp"); - configuration.setModelVersion(SecDispatcher.class.getPackage().getImplementationVersion()); + configuration.setModelVersion(SecDispatcher.class.getPackage().getSpecificationVersion()); configuration.setModelEncoding(StandardCharsets.UTF_8.name()); try (OutputStream out = Files.newOutputStream(tempFile)) {