From d4cb0c73c86067264ece6599e3df8a2d0216156f Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Mon, 8 May 2023 18:48:38 +0200 Subject: style(core): fix codestyle issues --- .../egiz/eaaf/core/impl/credential/inline/InlineKeyStoreBuilder.java | 4 +++- .../egiz/eaaf/core/impl/credential/inline/InlineKeyStoreParser.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'eaaf_core_utils/src/main') diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/inline/InlineKeyStoreBuilder.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/inline/InlineKeyStoreBuilder.java index a1e3a824..9ec2cfb4 100644 --- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/inline/InlineKeyStoreBuilder.java +++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/inline/InlineKeyStoreBuilder.java @@ -5,6 +5,7 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.net.URI; +import java.nio.charset.StandardCharsets; import java.security.GeneralSecurityException; import java.security.KeyStore; import java.security.KeyStoreException; @@ -129,7 +130,8 @@ public class InlineKeyStoreBuilder { private PrivateKey readPrivateKey(String filePath) throws IOException, EaafConfigurationException { try ( - Reader fileReader = new InputStreamReader(readResourceFromFile(filePath)); + Reader fileReader = new InputStreamReader( + readResourceFromFile(filePath), StandardCharsets.UTF_8); PEMParser pemParser = new PEMParser(fileReader)) { final Object object = pemParser.readObject(); diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/inline/InlineKeyStoreParser.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/inline/InlineKeyStoreParser.java index 0ddc2680..52afd2dd 100644 --- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/inline/InlineKeyStoreParser.java +++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/inline/InlineKeyStoreParser.java @@ -127,8 +127,8 @@ public class InlineKeyStoreParser extends URLStreamHandler { .map(keyValuePair -> new AbstractMap.SimpleEntry(keyValuePair[0], keyValuePair[1])) // map arrays to Entry objects .collect(Collectors - .groupingBy(AbstractMap.SimpleEntry::getKey)) // group entries with identical keys to a map of - // lists + // group entries with identical keys to a map of lists + .groupingBy(AbstractMap.SimpleEntry::getKey)) .entrySet().stream() // stream the map again .map(entry -> new AbstractMap.SimpleEntry<>(entry.getKey(), entry.getValue().stream().map(AbstractMap.SimpleEntry::getValue).collect(Collectors -- cgit v1.2.3