tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject [incubator-tamaya-sandbox] branch master updated: Fixed reader issues.
Date Tue, 14 May 2019 15:14:31 GMT
This is an automated email from the ASF dual-hosted git repository.

anatole pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tamaya-sandbox.git


The following commit(s) were added to refs/heads/master by this push:
     new 6f8220d  Fixed reader issues.
6f8220d is described below

commit 6f8220d5809b06ccc7a345f93d193064dfb105e8
Author: Anatole Tresch <atsticks@gmail.com>
AuthorDate: Tue May 14 17:13:53 2019 +0200

    Fixed reader issues.
---
 .../apache/tamaya/metamodel/internal/PropertyConverterReader.java  | 7 +++----
 .../org/apache/tamaya/metamodel/internal/PropertySourceReader.java | 5 ++++-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/metamodel/src/main/java/org/apache/tamaya/metamodel/internal/PropertyConverterReader.java
b/metamodel/src/main/java/org/apache/tamaya/metamodel/internal/PropertyConverterReader.java
index 3f628de..6238810 100644
--- a/metamodel/src/main/java/org/apache/tamaya/metamodel/internal/PropertyConverterReader.java
+++ b/metamodel/src/main/java/org/apache/tamaya/metamodel/internal/PropertyConverterReader.java
@@ -57,11 +57,10 @@ public class PropertyConverterReader implements MetaConfigurationReader{
                 continue;
             }
             ObjectValue ov = converterNode.toObjectValue();
-            if(ov.getPropertyValue("properties")==null){
-                LOG.severe("No property converter configured.");
-                continue;
+            ObjectValue propertyValue = null;
+            if(ov.getPropertyValue("properties")!=null){
+                propertyValue = ov.getPropertyValue("properties").toObjectValue();
             }
-            ObjectValue propertyValue = ov.getPropertyValue("properties").toObjectValue();
             Map<String,String> properties = propertyValue!=null? propertyValue.toLocalMap():
null;
             String type = ItemFactoryManager.getType(ov);
             if("defaults".equals(type)){
diff --git a/metamodel/src/main/java/org/apache/tamaya/metamodel/internal/PropertySourceReader.java
b/metamodel/src/main/java/org/apache/tamaya/metamodel/internal/PropertySourceReader.java
index 5c312ed..e8c1270 100644
--- a/metamodel/src/main/java/org/apache/tamaya/metamodel/internal/PropertySourceReader.java
+++ b/metamodel/src/main/java/org/apache/tamaya/metamodel/internal/PropertySourceReader.java
@@ -62,7 +62,10 @@ public class PropertySourceReader implements MetaConfigurationReader{
                 continue;
             }
             ObjectValue ov = node.toObjectValue();
-            ObjectValue propertyValue = ov.getPropertyValue("properties").toObjectValue();
+            ObjectValue propertyValue = null;
+            if(ov.getPropertyValue("properties")!=null) {
+                propertyValue = ov.getPropertyValue("properties").toObjectValue();
+            }
             Map<String,String> params = propertyValue!=null? propertyValue.toLocalMap():
null;
             String type = ItemFactoryManager.getType(ov);
             if ("defaults".equals(type)) {


Mime
View raw message