tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From otavioj...@apache.org
Subject incubator-tamaya git commit: removing OptionalBoolean
Date Mon, 15 Dec 2014 00:01:13 GMT
Repository: incubator-tamaya
Updated Branches:
  refs/heads/master c6fa7c677 -> 1cd8ca0f0


removing OptionalBoolean


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

Branch: refs/heads/master
Commit: 1cd8ca0f0985cb7977ff1c1545c1bbc2cc818da8
Parents: c6fa7c6
Author: otaviojava <otaviojava@people.apache.org>
Authored: Sun Dec 14 22:01:00 2014 -0200
Committer: otaviojava <otaviojava@people.apache.org>
Committed: Sun Dec 14 22:01:00 2014 -0200

----------------------------------------------------------------------
 .gitignore                                       | 12 ++++++++++++
 .../java/org/apache/tamaya/Configuration.java    | 19 +++++++------------
 .../tamaya/core/config/MappedConfiguration.java  |  1 -
 3 files changed, 19 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/1cd8ca0f/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 4c51d28..40a779f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,15 @@ release.properties
 *.log
 *~
 .DS_Store
+modules/.project
+modules/.settings/
+modules/integration/.project
+modules/integration/.settings/
+modules/integration/cdi/.classpath
+modules/integration/cdi/.project
+modules/integration/cdi/.settings/
+modules/metamodels/.project
+modules/metamodels/.settings/
+modules/metamodels/simple/.classpath
+modules/metamodels/simple/.project
+modules/metamodels/simple/.settings/

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/1cd8ca0f/api/src/main/java/org/apache/tamaya/Configuration.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/tamaya/Configuration.java b/api/src/main/java/org/apache/tamaya/Configuration.java
index 2cdd195..ac988ac 100644
--- a/api/src/main/java/org/apache/tamaya/Configuration.java
+++ b/api/src/main/java/org/apache/tamaya/Configuration.java
@@ -18,8 +18,6 @@
  */
 package org.apache.tamaya;
 
-import com.sun.javafx.scene.control.behavior.OptionalBoolean;
-
 import java.util.*;
 import java.util.function.Consumer;
 import java.util.function.Predicate;
@@ -52,16 +50,13 @@ public interface Configuration extends PropertySource {
      *            a/b/c/d.myProperty}.
      * @return the property's value.
      */
-    default OptionalBoolean getBoolean(String key){
-        Optional<Boolean> val = get(key, Boolean.class);
-        if(val.isPresent()){
-            if(val.get()){
-                return OptionalBoolean.TRUE;
-            }
-            return OptionalBoolean.FALSE;
-        }
-        return OptionalBoolean.ANY;
-    }
+	default Boolean getBoolean(String key) {
+		Optional<Boolean> val = get(key, Boolean.class);
+		if (val.isPresent()) {
+			return val.get();
+		}
+		return null;
+	}
 
     /**
      * Get the property value as {@link Integer}.

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/1cd8ca0f/core/src/main/java/org/apache/tamaya/core/config/MappedConfiguration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/config/MappedConfiguration.java b/core/src/main/java/org/apache/tamaya/core/config/MappedConfiguration.java
index d61b99c..d7114ce 100644
--- a/core/src/main/java/org/apache/tamaya/core/config/MappedConfiguration.java
+++ b/core/src/main/java/org/apache/tamaya/core/config/MappedConfiguration.java
@@ -1,6 +1,5 @@
 package org.apache.tamaya.core.config;
 
-import com.sun.javafx.scene.control.behavior.OptionalBoolean;
 import org.apache.tamaya.*;
 
 import java.util.*;


Mime
View raw message