You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by an...@apache.org on 2021/09/02 14:00:23 UTC
[sling-org-apache-sling-feature-cpconverter] 01/01: SLING-10789 :
JsonConfigurationEntryHandler - sonar findings
This is an automated email from the ASF dual-hosted git repository.
angela pushed a commit to branch SLING-10789
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git
commit c24efbda9b892c762d6f38824dd3da9e85dae954
Author: angela <an...@adobe.com>
AuthorDate: Thu Sep 2 15:59:56 2021 +0200
SLING-10789 : JsonConfigurationEntryHandler - sonar findings
---
.../cpconverter/handlers/JsonConfigurationEntryHandler.java | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/sling/feature/cpconverter/handlers/JsonConfigurationEntryHandler.java b/src/main/java/org/apache/sling/feature/cpconverter/handlers/JsonConfigurationEntryHandler.java
index 2d5fb46..336cd26 100644
--- a/src/main/java/org/apache/sling/feature/cpconverter/handlers/JsonConfigurationEntryHandler.java
+++ b/src/main/java/org/apache/sling/feature/cpconverter/handlers/JsonConfigurationEntryHandler.java
@@ -21,10 +21,8 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.Dictionary;
-import java.util.Hashtable;
import org.apache.felix.cm.json.Configurations;
-import org.apache.sling.feature.cpconverter.ConverterException;
import org.jetbrains.annotations.NotNull;
public final class JsonConfigurationEntryHandler extends AbstractConfigurationEntryHandler {
@@ -34,13 +32,11 @@ public final class JsonConfigurationEntryHandler extends AbstractConfigurationEn
}
@Override
- protected @NotNull Dictionary<String, Object> parseConfiguration(@NotNull String name, @NotNull InputStream input) throws IOException, ConverterException {
- final Hashtable<String, Object> props = Configurations.buildReader()
+ protected @NotNull Dictionary<String, Object> parseConfiguration(@NotNull String name, @NotNull InputStream input) throws IOException {
+ return Configurations.buildReader()
.withIdentifier(name)
.build(new InputStreamReader(input, StandardCharsets.UTF_8))
.readConfiguration();
-
- return props;
}
}