geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject svn commit: r1806754 - in /geronimo/components/config/trunk: impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java pom.xml
Date Thu, 31 Aug 2017 00:59:50 GMT
Author: johndament
Date: Thu Aug 31 00:59:50 2017
New Revision: 1806754

URL: http://svn.apache.org/viewvc?rev=1806754&view=rev
Log:
Aligning to MP Config 1.1.  Optimize property names to come from each config source's property
names.

Modified:
    geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java
    geronimo/components/config/trunk/pom.xml

Modified: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java?rev=1806754&r1=1806753&r2=1806754&view=diff
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java
(original)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java
Thu Aug 31 00:59:50 2017
@@ -28,16 +28,14 @@ import java.time.OffsetDateTime;
 import java.time.OffsetTime;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Optional;
-import java.util.Set;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import java.util.stream.Collectors;
 
 import org.apache.geronimo.config.converters.BooleanConverter;
 import org.apache.geronimo.config.converters.DoubleConverter;
@@ -158,22 +156,14 @@ public class ConfigImpl implements Confi
     }
 
     public ConfigValueImpl<String> access(String key) {
-        return new ConfigValueImpl<String>(this, key);
+        return new ConfigValueImpl<>(this, key);
     }
 
     @Override
     public Iterable<String> getPropertyNames() {
-        Set<String> result = new HashSet<>();
-
-        for (ConfigSource configSource : configSources) {
-            result.addAll(configSource.getProperties().keySet());
-
-        }
-        return result;
+        return configSources.stream().flatMap(c -> c.getPropertyNames().stream()).collect(Collectors.toSet());
     }
 
-
-
     @Override
     public Iterable<ConfigSource> getConfigSources() {
         return Collections.unmodifiableList(configSources);

Modified: geronimo/components/config/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/pom.xml?rev=1806754&r1=1806753&r2=1806754&view=diff
==============================================================================
--- geronimo/components/config/trunk/pom.xml (original)
+++ geronimo/components/config/trunk/pom.xml Thu Aug 31 00:59:50 2017
@@ -50,13 +50,13 @@
     <properties>
         <maven.compiler.source>1.8</maven.compiler.source>
         <maven.compiler.target>1.8</maven.compiler.target>
-        <microprofile-config.version>1.0</microprofile-config.version>
-        <owb.version>1.7.3</owb.version>
+        <microprofile-config.version>1.1</microprofile-config.version>
+        <owb.version>1.7.4</owb.version>
         <owb2.version>2.0.1-SNAPSHOT</owb2.version>
         <arquillian.version>1.1.13.Final</arquillian.version>
         <arquillian-weld-embedded.version>2.0.0.Beta5</arquillian-weld-embedded.version>
         <cdi2-api.version>2.0</cdi2-api.version>
-        <weld.version>3.0.0.Final</weld.version>
+        <weld.version>3.0.1.Final</weld.version>
     </properties>
 
 
@@ -112,6 +112,12 @@
             <id>eclipse-repo</id>
             <repositories>
                 <repository>
+                    <id>mpconfig11</id>
+                    <releases><enabled>true</enabled></releases>
+                    <snapshots><enabled>false</enabled></snapshots>
+                    <url>https://oss.sonatype.org/content/repositories/orgeclipsemicroprofile-1009/</url>
+                </repository>
+                <repository>
                     <id>microprofile-snapshots</id>
                     <releases><enabled>false</enabled></releases>
                     <snapshots><enabled>true</enabled></snapshots>



Mime
View raw message