You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/05/21 15:44:30 UTC

[commons-configuration] 03/04: Inline single use variables.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 06e89cb618eb15657f57da70eefe30513fbbaca3
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat May 21 11:44:08 2022 -0400

    Inline single use variables.
---
 .../java/org/apache/commons/configuration2/JSONConfiguration.java   | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/configuration2/JSONConfiguration.java b/src/main/java/org/apache/commons/configuration2/JSONConfiguration.java
index db9f8152..c1882195 100644
--- a/src/main/java/org/apache/commons/configuration2/JSONConfiguration.java
+++ b/src/main/java/org/apache/commons/configuration2/JSONConfiguration.java
@@ -66,8 +66,7 @@ public class JSONConfiguration extends AbstractYAMLBasedConfiguration implements
     @Override
     public void read(final Reader in) throws ConfigurationException {
         try {
-            final Map<String, Object> map = mapper.readValue(in, this.type);
-            load(map);
+            load(mapper.readValue(in, this.type));
         } catch (final Exception e) {
             rethrowException(e);
         }
@@ -87,8 +86,7 @@ public class JSONConfiguration extends AbstractYAMLBasedConfiguration implements
     @Override
     public void read(final InputStream in) throws ConfigurationException {
         try {
-            final Map<String, Object> map = mapper.readValue(in, this.type);
-            load(map);
+            load(mapper.readValue(in, this.type));
         } catch (final Exception e) {
             rethrowException(e);
         }