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:26:54 UTC
[commons-configuration] 02/02: Fix generics compiler warnings.
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 00a1b496409fc9943292a5568ebc8a945cafc71c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat May 21 11:26:47 2022 -0400
Fix generics compiler warnings.
---
.../java/org/apache/commons/configuration2/YAMLConfiguration.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/configuration2/YAMLConfiguration.java b/src/main/java/org/apache/commons/configuration2/YAMLConfiguration.java
index 4f918439..705c2a21 100644
--- a/src/main/java/org/apache/commons/configuration2/YAMLConfiguration.java
+++ b/src/main/java/org/apache/commons/configuration2/YAMLConfiguration.java
@@ -60,7 +60,7 @@ public class YAMLConfiguration extends AbstractYAMLBasedConfiguration implements
public void read(final Reader in) throws ConfigurationException {
try {
final Yaml yaml = createYamlForReading(new LoaderOptions());
- final Map<String, Object> map = (Map) yaml.load(in);
+ final Map<String, Object> map = yaml.load(in);
load(map);
} catch (final Exception e) {
rethrowException(e);
@@ -70,7 +70,7 @@ public class YAMLConfiguration extends AbstractYAMLBasedConfiguration implements
public void read(final Reader in, final LoaderOptions options) throws ConfigurationException {
try {
final Yaml yaml = createYamlForReading(options);
- final Map<String, Object> map = (Map) yaml.load(in);
+ final Map<String, Object> map = yaml.load(in);
load(map);
} catch (final Exception e) {
rethrowException(e);
@@ -99,7 +99,7 @@ public class YAMLConfiguration extends AbstractYAMLBasedConfiguration implements
public void read(final InputStream in) throws ConfigurationException {
try {
final Yaml yaml = createYamlForReading(new LoaderOptions());
- final Map<String, Object> map = (Map) yaml.load(in);
+ final Map<String, Object> map = yaml.load(in);
load(map);
} catch (final Exception e) {
rethrowException(e);
@@ -109,7 +109,7 @@ public class YAMLConfiguration extends AbstractYAMLBasedConfiguration implements
public void read(final InputStream in, final LoaderOptions options) throws ConfigurationException {
try {
final Yaml yaml = createYamlForReading(options);
- final Map<String, Object> map = (Map) yaml.load(in);
+ final Map<String, Object> map = yaml.load(in);
load(map);
} catch (final Exception e) {
rethrowException(e);