tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ple...@apache.org
Subject [36/50] [abbrv] incubator-tamaya-extensions git commit: Synched with head.
Date Sun, 23 Oct 2016 20:36:48 GMT
Synched with head.


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/b16020f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/b16020f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/b16020f4

Branch: refs/heads/old_master
Commit: b16020f4a0bae22110f34e2b25f11c994b9c1e6a
Parents: 3fffcb0
Author: anatole <anatole@apache.org>
Authored: Thu Feb 11 20:31:24 2016 +0100
Committer: Oliver B. Fischer <plexus@apache.org>
Committed: Fri Sep 30 21:29:37 2016 +0200

----------------------------------------------------------------------
 .../apache/tamaya/filter/ConfigurationFilter.java    | 15 ++++++++++++---
 .../org/apache/tamaya/filter/ProgrammableFilter.java |  6 +++---
 .../apache/tamaya/filter/RegexPropertyFilter.java    |  2 +-
 .../filter/internal/DefaultMetadataFilter.java       |  2 +-
 4 files changed, 17 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/b16020f4/src/main/java/org/apache/tamaya/filter/ConfigurationFilter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tamaya/filter/ConfigurationFilter.java b/src/main/java/org/apache/tamaya/filter/ConfigurationFilter.java
index 99ab27f..30ba3e2 100644
--- a/src/main/java/org/apache/tamaya/filter/ConfigurationFilter.java
+++ b/src/main/java/org/apache/tamaya/filter/ConfigurationFilter.java
@@ -62,12 +62,21 @@ public final class ConfigurationFilter implements PropertyFilter{
     };
 
     /**
+     * Flag if metadata entries (starting with an '_') are filtered out on when accessing
multiple properties, default
+     * is {@code true}.
+     * @return true, if metadata entries (starting with an '_') are to be filtered.
+     */
+    public static boolean isMetadataFiltered(){
+        return THREADED_METADATA_FILTERED.get();
+    }
+
+    /**
      * Seactivates metadata filtering also on global map access for this thread.
      * @see #clearFilters()
-     * @param active true,to enable metadata filtering (default).
+     * @param filtered true,to enable metadata filtering (default).
      */
-    public static void setMetadataFilter(boolean active){
-        THREADED_METADATA_FILTERED.set(active);
+    public static void setMetadataFiltered(boolean filtered){
+        THREADED_METADATA_FILTERED.set(filtered);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/b16020f4/src/main/java/org/apache/tamaya/filter/ProgrammableFilter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tamaya/filter/ProgrammableFilter.java b/src/main/java/org/apache/tamaya/filter/ProgrammableFilter.java
index 8589faa..18a7e08 100644
--- a/src/main/java/org/apache/tamaya/filter/ProgrammableFilter.java
+++ b/src/main/java/org/apache/tamaya/filter/ProgrammableFilter.java
@@ -80,8 +80,8 @@ public final class ProgrammableFilter implements PropertyFilter{
      * @param filters the filters to be applied.
      */
     public void setFilters(Collection<PropertyFilter> filters) {
-        filters.clear();
-        filters.addAll(filters);
+        this.filters.clear();
+        this.filters.addAll(filters);
     }
 
     /**
@@ -102,7 +102,7 @@ public final class ProgrammableFilter implements PropertyFilter{
 
     @Override
     public String toString() {
-        return "FilterConfig{" +
+        return "ProgrammableFilter{" +
                 "filters=" + filters +
                 '}';
     }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/b16020f4/src/main/java/org/apache/tamaya/filter/RegexPropertyFilter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tamaya/filter/RegexPropertyFilter.java b/src/main/java/org/apache/tamaya/filter/RegexPropertyFilter.java
index 616f2cf..1ed43ba 100644
--- a/src/main/java/org/apache/tamaya/filter/RegexPropertyFilter.java
+++ b/src/main/java/org/apache/tamaya/filter/RegexPropertyFilter.java
@@ -48,7 +48,7 @@ public final class RegexPropertyFilter implements PropertyFilter{
 
     @Override
     public String toString() {
-        return "RegexPredicate{" +
+        return "RegexPropertyFilter{" +
                 "expression='" + expression + '\'' +
                 '}';
     }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/b16020f4/src/main/java/org/apache/tamaya/filter/internal/DefaultMetadataFilter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tamaya/filter/internal/DefaultMetadataFilter.java b/src/main/java/org/apache/tamaya/filter/internal/DefaultMetadataFilter.java
index 1119cba..95e9d25 100644
--- a/src/main/java/org/apache/tamaya/filter/internal/DefaultMetadataFilter.java
+++ b/src/main/java/org/apache/tamaya/filter/internal/DefaultMetadataFilter.java
@@ -32,7 +32,7 @@ public final class DefaultMetadataFilter implements PropertyFilter{
             // When accessing keys explicitly, do not hide anything.
             return valueToBeFiltered;
         }
-        if(ConfigurationFilter.THREADED_METADATA_FILTERED.get()) {
+        if(ConfigurationFilter.isMetadataFiltered()) {
             if (context.getKey().startsWith("_")) {
                 // Hide metadata entries.
                 return null;


Mime
View raw message