Repository: incubator-tamaya-extensions
Updated Branches:
  refs/heads/master 8ab71a127 -> e73a36a44


TAMAYA-291: Fix warnings and use non-deprecated methods


Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/e73a36a4
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/e73a36a4
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/e73a36a4

Branch: refs/heads/master
Commit: e73a36a44fa8e2ed0dbdc528cd2ac68a1e7a2ba9
Parents: 8ab71a1
Author: Phil Ottlinger <[email protected]>
Authored: Sun Oct 22 23:13:08 2017 +0200
Committer: Phil Ottlinger <[email protected]>
Committed: Sun Oct 22 23:13:08 2017 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/tamaya/yaml/YAMLFormat.java     | 8 ++++----
 .../src/test/java/org/apache/tamaya/yaml/YAMLFormatTest.java | 2 --
 2 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/e73a36a4/modules/formats/yaml/src/main/java/org/apache/tamaya/yaml/YAMLFormat.java
----------------------------------------------------------------------
diff --git 
a/modules/formats/yaml/src/main/java/org/apache/tamaya/yaml/YAMLFormat.java 
b/modules/formats/yaml/src/main/java/org/apache/tamaya/yaml/YAMLFormat.java
index adf7b34..33d6bed 100644
--- a/modules/formats/yaml/src/main/java/org/apache/tamaya/yaml/YAMLFormat.java
+++ b/modules/formats/yaml/src/main/java/org/apache/tamaya/yaml/YAMLFormat.java
@@ -61,8 +61,7 @@ public class YAMLFormat implements ConfigurationFormat {
     @Override
     public ConfigurationData readConfiguration(String resource, InputStream 
inputStream) {
         Map<String, String> values = readConfig(resource, inputStream);
-        return ConfigurationDataBuilder.of(resource, 
this).addProperties(values)
-            .build();
+        return ConfigurationDataBuilder.of(resource, 
this).addDefaultProperties(values).build();
     }
 
     /**
@@ -85,7 +84,7 @@ public class YAMLFormat implements ConfigurationFormat {
 
     /**
      * Reads the configuration.
-     * @param urlResource soure of the configuration.
+     * @param urlResource source of the configuration.
      * @return the configuration read from the given resource URL.
      * @throws ConfigException if resource URL cannot be read.
      */
@@ -113,7 +112,8 @@ public class YAMLFormat implements ConfigurationFormat {
      *               returned as result of the format reading operation ans 
integrated into the overall configuration
      *               map.
      */
-    protected void mapYamlIntoProperties(String prefix, Object config, 
HashMap<String, String> values) {
+    @SuppressWarnings("unchecked")
+       protected void mapYamlIntoProperties(String prefix, Object config, 
HashMap<String, String> values) {
         // add further data types supported by yaml, e.g. date, ...
         if(config instanceof List){
             StringBuilder b = new StringBuilder();

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/e73a36a4/modules/formats/yaml/src/test/java/org/apache/tamaya/yaml/YAMLFormatTest.java
----------------------------------------------------------------------
diff --git 
a/modules/formats/yaml/src/test/java/org/apache/tamaya/yaml/YAMLFormatTest.java 
b/modules/formats/yaml/src/test/java/org/apache/tamaya/yaml/YAMLFormatTest.java
index 9f241f0..e5d30c6 100644
--- 
a/modules/formats/yaml/src/test/java/org/apache/tamaya/yaml/YAMLFormatTest.java
+++ 
b/modules/formats/yaml/src/test/java/org/apache/tamaya/yaml/YAMLFormatTest.java
@@ -27,8 +27,6 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Map;
 
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;

Reply via email to