You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by ot...@apache.org on 2014/12/15 00:13:42 UTC

[1/2] incubator-tamaya git commit: using method refence in ConfigFunctions

Repository: incubator-tamaya
Updated Branches:
  refs/heads/master 1af5a7db6 -> 9ac2684f8


using method refence in ConfigFunctions


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

Branch: refs/heads/master
Commit: 1e6c88cc9195fc219da23afbbd45f375f87afe60
Parents: 1af5a7d
Author: otaviojava <ot...@people.apache.org>
Authored: Sun Dec 14 21:09:38 2014 -0200
Committer: otaviojava <ot...@people.apache.org>
Committed: Sun Dec 14 21:09:38 2014 -0200

----------------------------------------------------------------------
 .../main/java/org/apache/tamaya/core/config/ConfigFunctions.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/1e6c88cc/core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java b/core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java
index e28da5e..f46473a 100644
--- a/core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java
+++ b/core/src/main/java/org/apache/tamaya/core/config/ConfigFunctions.java
@@ -63,7 +63,7 @@ public final class ConfigFunctions {
                             .filter(e -> isKeyInArea(e.getKey(), areaKey))
                             .collect(Collectors.toMap(
                                     e -> stripKeys ? e.getKey().substring(areaKey.length() + 1) : e.getKey(),
-                                    e -> e.getValue())));
+                                    Map.Entry::getValue)));
             return PropertySourceBuilder.create("area: " + areaKey).addMap(area).build().toConfiguration();
         };
     }
@@ -110,7 +110,7 @@ public final class ConfigFunctions {
                             .filter(e -> e.getKey().startsWith(lookupKey))
                             .collect(Collectors.toMap(
                                     e -> stripKeys ? e.getKey().substring(areaKey.length() + 1) : e.getKey(),
-                                    e -> e.getValue())));
+                                    Map.Entry::getValue)));
             return PropertySourceBuilder.create("area (recursive): " + areaKey).addMap(area).build().toConfiguration();
         };
     }


[2/2] incubator-tamaya git commit: removes semicolon

Posted by ot...@apache.org.
removes semicolon


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

Branch: refs/heads/master
Commit: 9ac2684f867459e318b1a10a53fbdbdf4f1b5943
Parents: 1e6c88c
Author: otaviojava <ot...@people.apache.org>
Authored: Sun Dec 14 21:13:28 2014 -0200
Committer: otaviojava <ot...@people.apache.org>
Committed: Sun Dec 14 21:13:28 2014 -0200

----------------------------------------------------------------------
 .../tamaya/core/internal/resources/io/AntPathMatcher.java       | 2 +-
 .../resources/io/PathMatchingResourcePatternResolver.java       | 4 ++--
 .../apache/tamaya/core/internal/resources/io/StringUtils.java   | 2 +-
 .../apache/tamaya/core/properties/AggregatedPropertySource.java | 4 +---
 .../apache/tamaya/core/properties/ReplacingPropertySource.java  | 5 ++---
 5 files changed, 7 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/9ac2684f/core/src/main/java/org/apache/tamaya/core/internal/resources/io/AntPathMatcher.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/resources/io/AntPathMatcher.java b/core/src/main/java/org/apache/tamaya/core/internal/resources/io/AntPathMatcher.java
index 5993652..7626e19 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/resources/io/AntPathMatcher.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/resources/io/AntPathMatcher.java
@@ -393,7 +393,7 @@ class AntPathMatcher {
 		boolean result = doMatch(pattern, path, true, variables);
 		if(!result){
             throw new IllegalArgumentException("Pattern \"" + pattern + "\" is not a match for \"" + path + "\"");
-        };
+        }
 		return variables;
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/9ac2684f/core/src/main/java/org/apache/tamaya/core/internal/resources/io/PathMatchingResourcePatternResolver.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/resources/io/PathMatchingResourcePatternResolver.java b/core/src/main/java/org/apache/tamaya/core/internal/resources/io/PathMatchingResourcePatternResolver.java
index 08b9cc8..900a53f 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/resources/io/PathMatchingResourcePatternResolver.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/resources/io/PathMatchingResourcePatternResolver.java
@@ -236,7 +236,7 @@ public final class PathMatchingResourcePatternResolver{
         else {
             // Only look for a pattern after a prefix here
             // (to not get fooled by a pattern symbol in a strange prefix).
-            int prefixEnd = locationPattern.indexOf(":") + 1;
+            int prefixEnd = locationPattern.indexOf(':') + 1;
             if (getPathMatcher().isPattern(locationPattern.substring(prefixEnd))) {
                 // a file pattern
                 return findPathMatchingResources(locationPattern);
@@ -385,7 +385,7 @@ public final class PathMatchingResourcePatternResolver{
      * @see #retrieveMatchingFiles
      */
     protected String determineRootDir(String location) {
-        int prefixEnd = location.indexOf(":") + 1;
+        int prefixEnd = location.indexOf(':') + 1;
         int rootDirEnd = location.length();
         while (rootDirEnd > prefixEnd && getPathMatcher().isPattern(location.substring(prefixEnd, rootDirEnd))) {
             rootDirEnd = location.lastIndexOf('/', rootDirEnd - 2) + 1;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/9ac2684f/core/src/main/java/org/apache/tamaya/core/internal/resources/io/StringUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/resources/io/StringUtils.java b/core/src/main/java/org/apache/tamaya/core/internal/resources/io/StringUtils.java
index d11d337..5d37917 100644
--- a/core/src/main/java/org/apache/tamaya/core/internal/resources/io/StringUtils.java
+++ b/core/src/main/java/org/apache/tamaya/core/internal/resources/io/StringUtils.java
@@ -615,7 +615,7 @@ class StringUtils {
 		// first path element. This is necessary to correctly parse paths like
 		// "file:core/../core/io/Resource.class", where the ".." should just
 		// strip the first "core" directory while keeping the "file:" prefix.
-		int prefixIndex = pathToUse.indexOf(":");
+		int prefixIndex = pathToUse.indexOf(':');
 		String prefix = "";
 		if (prefixIndex != -1) {
 			prefix = pathToUse.substring(0, prefixIndex + 1);

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/9ac2684f/core/src/main/java/org/apache/tamaya/core/properties/AggregatedPropertySource.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/AggregatedPropertySource.java b/core/src/main/java/org/apache/tamaya/core/properties/AggregatedPropertySource.java
index 85844b6..3039b6c 100644
--- a/core/src/main/java/org/apache/tamaya/core/properties/AggregatedPropertySource.java
+++ b/core/src/main/java/org/apache/tamaya/core/properties/AggregatedPropertySource.java
@@ -113,9 +113,7 @@ class AggregatedPropertySource extends AbstractPropertySource {
 
     @Override
 	public ConfigChangeSet load() {
-		for (PropertySource unit : units) {
-			unit.load();
-		}
+        units.forEach(org.apache.tamaya.PropertySource::load);
         return super.load();
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/9ac2684f/core/src/main/java/org/apache/tamaya/core/properties/ReplacingPropertySource.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/ReplacingPropertySource.java b/core/src/main/java/org/apache/tamaya/core/properties/ReplacingPropertySource.java
index 73af6b9..cee7891 100644
--- a/core/src/main/java/org/apache/tamaya/core/properties/ReplacingPropertySource.java
+++ b/core/src/main/java/org/apache/tamaya/core/properties/ReplacingPropertySource.java
@@ -70,9 +70,8 @@ class ReplacingPropertySource implements PropertySource {
     @Override
     public Map<String,String> toMap(){
         Map<String,String> result = new HashMap<>(replacingMap);
-        mainMap.toMap().entrySet().stream().filter(en -> !replacingMap.containsKey(en.getKey())).forEach(en -> {
-            result.put(en.getKey(), en.getValue());
-        });
+        mainMap.toMap().entrySet().stream().filter(en -> !replacingMap.containsKey(en.getKey())).forEach(en ->
+                result.put(en.getKey(), en.getValue()));
         return result;
     }