tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject [1/7] incubator-tamaya git commit: TAMAYA-126: Removed refs to StringJoiner.
Date Mon, 19 Oct 2015 00:33:45 GMT
Repository: incubator-tamaya
Updated Branches:
  refs/heads/master e3f7e05d8 -> ad303acc7


TAMAYA-126: Removed refs to StringJoiner.


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

Branch: refs/heads/master
Commit: c424a74beecff0eba71c5d54f7b6e7310169cb4a
Parents: e3f7e05
Author: anatole <anatole@apache.org>
Authored: Sat Oct 17 23:12:04 2015 +0200
Committer: anatole <anatole@apache.org>
Committed: Sat Oct 17 23:12:04 2015 +0200

----------------------------------------------------------------------
 .../core/internal/DefaultConfigurationContext.java     |  5 ++---
 .../builder/ProgrammaticConfigurationContext.java      |  5 ++---
 .../org/apache/tamaya/resource/internal/Locator.java   | 13 ++++++-------
 3 files changed, 10 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/c424a74b/attic/java8/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfigurationContext.java
----------------------------------------------------------------------
diff --git a/attic/java8/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfigurationContext.java
b/attic/java8/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfigurationContext.java
index 4657a32..96d5909 100644
--- a/attic/java8/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfigurationContext.java
+++ b/attic/java8/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfigurationContext.java
@@ -35,7 +35,6 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
-import java.util.StringJoiner;
 import java.util.function.Function;
 import java.util.logging.Logger;
 
@@ -233,8 +232,8 @@ public class DefaultConfigurationContext implements ConfigurationContext
{
     }
 
     private <T> String createStringList(Collection<T> propertySources, Function<T,String>
mapper){
-        StringJoiner joiner = new StringJoiner(", ");
-        propertySources.forEach(t -> joiner.add(mapper.apply(t)));
+        StringBuilder joiner = new StringBuilder(", ");
+        propertySources.forEach(t -> joiner.append(mapper.apply(t)));
         return joiner.toString();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/c424a74b/modules/builder/src/main/java/org/apache/tamaya/builder/ProgrammaticConfigurationContext.java
----------------------------------------------------------------------
diff --git a/modules/builder/src/main/java/org/apache/tamaya/builder/ProgrammaticConfigurationContext.java
b/modules/builder/src/main/java/org/apache/tamaya/builder/ProgrammaticConfigurationContext.java
index b333986..9f675dc 100644
--- a/modules/builder/src/main/java/org/apache/tamaya/builder/ProgrammaticConfigurationContext.java
+++ b/modules/builder/src/main/java/org/apache/tamaya/builder/ProgrammaticConfigurationContext.java
@@ -39,7 +39,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
-import java.util.StringJoiner;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.StampedLock;
 import java.util.function.Function;
@@ -249,8 +248,8 @@ class ProgrammaticConfigurationContext implements ConfigurationContext
{
     }
 
     private <T> String createStringList(Collection<T> propertySources, Function<T,
String> mapper) {
-        StringJoiner joiner = new StringJoiner(", ");
-        propertySources.forEach(t -> joiner.add(mapper.apply(t)));
+        StringBuilder joiner = new StringBuilder(", ");
+        propertySources.forEach(t -> joiner.append(mapper.apply(t)));
         return joiner.toString();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/c424a74b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/Locator.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/Locator.java
b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/Locator.java
index 8b20920..dc900a0 100644
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/Locator.java
+++ b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/Locator.java
@@ -20,7 +20,6 @@ package org.apache.tamaya.resource.internal;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.StringJoiner;
 
 /**
  * Small helper class that manages the path parts of a location expression.
@@ -62,12 +61,12 @@ final class Locator {
      * @return the root path, never null.
      */
     public String getRootPath() {
-        StringJoiner sj = new StringJoiner("/");
+        StringBuilder sj = new StringBuilder("/");
         for (String token : this.tokens) {
             if (containsPlaceholder(token)) {
                 break;
             } else {
-                sj.add(token);
+                sj.append(token);
             }
         }
         return sj.toString();
@@ -80,9 +79,9 @@ final class Locator {
      * @return the sub expression part, never null.
      */
     public String getSubPath() {
-        StringJoiner sj = new StringJoiner("/");
+        StringBuilder sj = new StringBuilder("/");
         for (String token : getSubPathTokens()) {
-            sj.add(token);
+            sj.append(token);
         }
         return sj.toString();
     }
@@ -113,9 +112,9 @@ final class Locator {
      * @return the full expression path, never null.
      */
     public String getPath() {
-        StringJoiner sj = new StringJoiner("/");
+        StringBuilder sj = new StringBuilder("/");
         for (String token : tokens) {
-            sj.add(token);
+            sj.append(token);
         }
         return sj.toString();
     }


Mime
View raw message