You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by pl...@apache.org on 2016/09/25 21:23:57 UTC

[09/50] [abbrv] incubator-tamaya-sandbox git commit: Establishing naming convention for property filters.

Establishing naming convention for property filters.


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

Branch: refs/heads/master
Commit: a63c28f7f2b3133bf7ea5d857fb36ef132f47540
Parents: f34d77d
Author: Oliver B. Fischer <pl...@apache.org>
Authored: Tue Apr 14 08:42:56 2015 +0200
Committer: Oliver B. Fischer <pl...@apache.org>
Committed: Tue Apr 14 08:42:56 2015 +0200

----------------------------------------------------------------------
 .../builder/ConfigurationBuilderTest.java       | 16 ++++-----
 .../builder/TestANonSPIPropertyFilter.java      | 34 ++++++++++++++++++++
 .../builder/TestBNonSPIPropertyFilter.java      | 34 ++++++++++++++++++++
 .../builder/TestNonSPIPropertyFilterA.java      | 34 --------------------
 .../builder/TestNonSPIPropertyFilterB.java      | 34 --------------------
 5 files changed, 76 insertions(+), 76 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a63c28f7/src/test/java/org/apache/tamaya/builder/ConfigurationBuilderTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/tamaya/builder/ConfigurationBuilderTest.java b/src/test/java/org/apache/tamaya/builder/ConfigurationBuilderTest.java
index 5f33c24..e28f3ea 100644
--- a/src/test/java/org/apache/tamaya/builder/ConfigurationBuilderTest.java
+++ b/src/test/java/org/apache/tamaya/builder/ConfigurationBuilderTest.java
@@ -372,7 +372,7 @@ public class ConfigurationBuilderTest {
         ConfigurationBuilder builder = new ConfigurationBuilder();
 
         Configuration config = builder.addPropertySources(source)
-                                      .addPropertyFilters(new TestNonSPIPropertyFilterA())
+                                      .addPropertyFilters(new TestANonSPIPropertyFilter())
                                       .build();
 
         String property = config.get("key");
@@ -391,8 +391,8 @@ public class ConfigurationBuilderTest {
         ConfigurationBuilder builder = new ConfigurationBuilder();
 
         Configuration config = builder.addPropertySources(source)
-                                      .addPropertyFilters(new TestNonSPIPropertyFilterA())
-                                      .addPropertyFilters(new TestNonSPIPropertyFilterB())
+                                      .addPropertyFilters(new TestANonSPIPropertyFilter())
+                                      .addPropertyFilters(new TestBNonSPIPropertyFilter())
                                       .build();
 
         String property = config.get("key");
@@ -412,9 +412,9 @@ public class ConfigurationBuilderTest {
         ConfigurationBuilder builder = new ConfigurationBuilder();
 
         Configuration config = builder.addPropertySources(source)
-                                      .addPropertyFilters(new TestNonSPIPropertyFilterA(),
+                                      .addPropertyFilters(new TestANonSPIPropertyFilter(),
                                               null,
-                                              new TestNonSPIPropertyFilterB())
+                                              new TestBNonSPIPropertyFilter())
                                       .build();
 
         String property = config.get("key");
@@ -435,7 +435,7 @@ public class ConfigurationBuilderTest {
 
         Configuration config = builder.addPropertySources(source)
                                       .addPropertyFilters((PropertyFilter)null) // The cast is needed!
-                                      .addPropertyFilters(new TestNonSPIPropertyFilterB())
+                                      .addPropertyFilters(new TestBNonSPIPropertyFilter())
                                       .build();
 
         String property = config.get("key");
@@ -454,8 +454,8 @@ public class ConfigurationBuilderTest {
         ConfigurationBuilder builder = new ConfigurationBuilder();
 
         Configuration config = builder.addPropertySources(source)
-                                      .addPropertyFilters(new TestNonSPIPropertyFilterA(),
-                                                          new TestNonSPIPropertyFilterB())
+                                      .addPropertyFilters(new TestANonSPIPropertyFilter(),
+                                                          new TestBNonSPIPropertyFilter())
                                       .build();
 
         String property = config.get("key");

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a63c28f7/src/test/java/org/apache/tamaya/builder/TestANonSPIPropertyFilter.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/tamaya/builder/TestANonSPIPropertyFilter.java b/src/test/java/org/apache/tamaya/builder/TestANonSPIPropertyFilter.java
new file mode 100644
index 0000000..e113010
--- /dev/null
+++ b/src/test/java/org/apache/tamaya/builder/TestANonSPIPropertyFilter.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.builder;
+
+import org.apache.tamaya.spi.PropertyFilter;
+
+public class TestANonSPIPropertyFilter implements PropertyFilter {
+    @Override
+    public String filterProperty(String key, String value) {
+        String result = value;
+
+        if (!result.contains(("ABC"))) {
+            result = value + "ABC";
+        }
+
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a63c28f7/src/test/java/org/apache/tamaya/builder/TestBNonSPIPropertyFilter.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/tamaya/builder/TestBNonSPIPropertyFilter.java b/src/test/java/org/apache/tamaya/builder/TestBNonSPIPropertyFilter.java
new file mode 100644
index 0000000..2ce81fc
--- /dev/null
+++ b/src/test/java/org/apache/tamaya/builder/TestBNonSPIPropertyFilter.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.builder;
+
+import org.apache.tamaya.spi.PropertyFilter;
+
+public class TestBNonSPIPropertyFilter implements PropertyFilter {
+    @Override
+    public String filterProperty(String key, String value) {
+        String result = value;
+
+        if (!result.contains(("XYZ"))) {
+            result = value + "XYZ";
+        }
+
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a63c28f7/src/test/java/org/apache/tamaya/builder/TestNonSPIPropertyFilterA.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/tamaya/builder/TestNonSPIPropertyFilterA.java b/src/test/java/org/apache/tamaya/builder/TestNonSPIPropertyFilterA.java
deleted file mode 100644
index 4b9ae72..0000000
--- a/src/test/java/org/apache/tamaya/builder/TestNonSPIPropertyFilterA.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.builder;
-
-import org.apache.tamaya.spi.PropertyFilter;
-
-public class TestNonSPIPropertyFilterA implements PropertyFilter {
-    @Override
-    public String filterProperty(String key, String value) {
-        String result = value;
-
-        if (!result.contains(("ABC"))) {
-            result = value + "ABC";
-        }
-
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a63c28f7/src/test/java/org/apache/tamaya/builder/TestNonSPIPropertyFilterB.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/tamaya/builder/TestNonSPIPropertyFilterB.java b/src/test/java/org/apache/tamaya/builder/TestNonSPIPropertyFilterB.java
deleted file mode 100644
index 95112b0..0000000
--- a/src/test/java/org/apache/tamaya/builder/TestNonSPIPropertyFilterB.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.builder;
-
-import org.apache.tamaya.spi.PropertyFilter;
-
-public class TestNonSPIPropertyFilterB implements PropertyFilter {
-    @Override
-    public String filterProperty(String key, String value) {
-        String result = value;
-
-        if (!result.contains(("XYZ"))) {
-            result = value + "XYZ";
-        }
-
-        return result;
-    }
-}