You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2020/12/11 21:30:05 UTC

[cxf] branch 3.4.x-fixes updated (d2ec7e4 -> 663a768)

This is an automated email from the ASF dual-hosted git repository.

reta pushed a change to branch 3.4.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git.


    from d2ec7e4  Update to Spring Boot 2.3.7.RELEASE and Micrometer 1.5.9
     new cc7f1d2  Update to MicroProfile 2.0.0-RC3 (#736)
     new 663a768  Recording .gitmergeinfo Changes

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitmergeinfo                                      |  2 +
 parent/pom.xml                                     |  6 +-
 .../cxf/microprofile/client/mock/MockConfig.java   | 95 ++++++++++++++++++++++
 .../client/mock/MockConfigProviderResolver.java    | 48 +----------
 .../microprofile/rest/client/MockConfig.java       | 95 ++++++++++++++++++++++
 .../rest/client/MockConfigProviderResolver.java    | 46 +----------
 systests/microprofile/client/weld/testng.xml       |  6 +-
 7 files changed, 205 insertions(+), 93 deletions(-)
 create mode 100644 rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/mock/MockConfig.java
 create mode 100644 systests/microprofile/client/jaxrs/src/test/java/org/apache/cxf/systest/microprofile/rest/client/MockConfig.java


[cxf] 01/02: Update to MicroProfile 2.0.0-RC3 (#736)

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 3.4.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit cc7f1d26f9fd3f70827748e88bef3fc75ae5ad59
Author: Andriy Redko <dr...@gmail.com>
AuthorDate: Fri Dec 11 10:07:03 2020 -0500

    Update to MicroProfile 2.0.0-RC3 (#736)
    
    (cherry picked from commit 6a77819f4bc141fcddd53a36b178972f1f68fe97)
    
    # Conflicts:
    #	parent/pom.xml
---
 parent/pom.xml                                     |  6 +-
 .../cxf/microprofile/client/mock/MockConfig.java   | 95 ++++++++++++++++++++++
 .../client/mock/MockConfigProviderResolver.java    | 48 +----------
 .../microprofile/rest/client/MockConfig.java       | 95 ++++++++++++++++++++++
 .../rest/client/MockConfigProviderResolver.java    | 46 +----------
 systests/microprofile/client/weld/testng.xml       |  6 +-
 6 files changed, 203 insertions(+), 93 deletions(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index e7f02d4..6f14afc 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -163,9 +163,9 @@
         <cxf.lucene.version>8.2.0</cxf.lucene.version>
         <cxf.maven.core.version>3.6.3</cxf.maven.core.version>
         <cxf.micrometer.version>1.5.9</cxf.micrometer.version>
-        <cxf.microprofile.config.version>1.2</cxf.microprofile.config.version>
-        <cxf.microprofile.rest.client.version>2.0-RC2</cxf.microprofile.rest.client.version>
-        <cxf.microprofile.openapi.version>1.1.2</cxf.microprofile.openapi.version>        
+        <cxf.microprofile.config.version>2.0</cxf.microprofile.config.version>
+        <cxf.microprofile.rest.client.version>2.0.0-RC3</cxf.microprofile.rest.client.version>
+        <cxf.microprofile.openapi.version>2.0.0-RC3</cxf.microprofile.openapi.version>        
         <cxf.mina.version>2.1.3</cxf.mina.version>
         <cxf.mockito.version>3.4.6</cxf.mockito.version>
         <cxf.msv.version>2013.6.1</cxf.msv.version>
diff --git a/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/mock/MockConfig.java b/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/mock/MockConfig.java
new file mode 100644
index 0000000..c34074a
--- /dev/null
+++ b/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/mock/MockConfig.java
@@ -0,0 +1,95 @@
+/**
+ * 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.cxf.microprofile.client.mock;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+
+import org.eclipse.microprofile.config.Config;
+import org.eclipse.microprofile.config.ConfigValue;
+import org.eclipse.microprofile.config.spi.ConfigSource;
+import org.eclipse.microprofile.config.spi.Converter;
+
+public class MockConfig implements Config {
+    private final Map<String, String> configValues;
+    
+    public MockConfig(Map<String, String> configValues) {
+        this.configValues = configValues;
+    }
+    
+    @Override
+    public <T> T getValue(String propertyName, Class<T> propertyType) {
+        String value = configValues.get(propertyName);
+        if (value != null) {
+            if (propertyType == String.class) {
+                return propertyType.cast(value);
+            }
+            if (propertyType == Integer.class) {
+                return propertyType.cast(Integer.parseInt(value));
+            }
+        }
+        return null;
+    }
+    @Override
+    public <T> Optional<T> getOptionalValue(String propertyName, Class<T> propertyType) {
+        return Optional.ofNullable(getValue(propertyName, propertyType));
+    }
+    @Override
+    public Iterable<String> getPropertyNames() {
+        return configValues.keySet();
+    }
+    @Override
+    public Iterable<ConfigSource> getConfigSources() {
+        ConfigSource source = new ConfigSource() {
+            @Override
+            public Map<String, String> getProperties() {
+                return configValues;
+            }
+            @Override
+            public String getValue(String propertyName) {
+                return (String) configValues.get(propertyName);
+            }
+            @Override
+            public String getName() {
+                return "stub";
+            } 
+            
+            @Override
+            public Set<String> getPropertyNames() {
+                return configValues.keySet();
+            }
+        };
+        return Arrays.asList(source);
+    }
+    @Override
+    public ConfigValue getConfigValue(String propertyName) {
+        return null;
+    }
+    @Override
+    public <T> Optional<Converter<T>> getConverter(Class<T> forType) {
+        return Optional.empty();
+    }
+    
+    @Override
+    public <T> T unwrap(Class<T> type) {
+        throw new IllegalArgumentException("Unsupported type: " + type);
+    }
+}
diff --git a/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/mock/MockConfigProviderResolver.java b/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/mock/MockConfigProviderResolver.java
index 962d969..2444faf 100644
--- a/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/mock/MockConfigProviderResolver.java
+++ b/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/mock/MockConfigProviderResolver.java
@@ -18,66 +18,26 @@
  */
 package org.apache.cxf.microprofile.client.mock;
 
-import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Optional;
 
 import org.eclipse.microprofile.config.Config;
 import org.eclipse.microprofile.config.spi.ConfigBuilder;
 import org.eclipse.microprofile.config.spi.ConfigProviderResolver;
-import org.eclipse.microprofile.config.spi.ConfigSource;
 
 public class MockConfigProviderResolver extends ConfigProviderResolver {
 
     private final Map<String, String> configValues;
-    
-    private final Config config = new Config() {
-        @Override
-        public <T> T getValue(String propertyName, Class<T> propertyType) {
-            String value = configValues.get(propertyName);
-            if (value != null) {
-                if (propertyType == String.class) {
-                    return propertyType.cast(value);
-                }
-                if (propertyType == Integer.class) {
-                    return propertyType.cast(Integer.parseInt(value));
-                }
-            }
-            return null;
-        }
-        @Override
-        public <T> Optional<T> getOptionalValue(String propertyName, Class<T> propertyType) {
-            return Optional.ofNullable(getValue(propertyName, propertyType));
-        }
-        @Override
-        public Iterable<String> getPropertyNames() {
-            return configValues.keySet();
-        }
-        @Override
-        public Iterable<ConfigSource> getConfigSources() {
-            ConfigSource source = new ConfigSource() {
-                @Override
-                public Map<String, String> getProperties() {
-                    return configValues;
-                }
-                @Override
-                public String getValue(String propertyName) {
-                    return (String) configValues.get(propertyName);
-                }
-                @Override
-                public String getName() {
-                    return "stub";
-                } };
-            return Arrays.asList(source);
-        } };
-
+    private final Config config;
+            
     public MockConfigProviderResolver() {
         configValues = new HashMap<>();
+        config = new MockConfig(configValues);
     }
 
     public MockConfigProviderResolver(Map<String, String> configValues) {
         this.configValues = configValues;
+        this.config = new MockConfig(configValues);
     }
 
     public void setConfigValues(Map<String, String> configValues) {
diff --git a/systests/microprofile/client/jaxrs/src/test/java/org/apache/cxf/systest/microprofile/rest/client/MockConfig.java b/systests/microprofile/client/jaxrs/src/test/java/org/apache/cxf/systest/microprofile/rest/client/MockConfig.java
new file mode 100644
index 0000000..7e1d69b
--- /dev/null
+++ b/systests/microprofile/client/jaxrs/src/test/java/org/apache/cxf/systest/microprofile/rest/client/MockConfig.java
@@ -0,0 +1,95 @@
+/**
+ * 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.cxf.systest.microprofile.rest.client;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+
+import org.eclipse.microprofile.config.Config;
+import org.eclipse.microprofile.config.ConfigValue;
+import org.eclipse.microprofile.config.spi.ConfigSource;
+import org.eclipse.microprofile.config.spi.Converter;
+
+public class MockConfig implements Config {
+    private final Map<String, String> configValues;
+    
+    public MockConfig(Map<String, String> configValues) {
+        this.configValues = configValues;
+    }
+    
+    @Override
+    public <T> T getValue(String propertyName, Class<T> propertyType) {
+        String value = configValues.get(propertyName);
+        if (value != null) {
+            if (propertyType == String.class) {
+                return propertyType.cast(value);
+            }
+            if (propertyType == Integer.class) {
+                return propertyType.cast(Integer.parseInt(value));
+            }
+        }
+        return null;
+    }
+    @Override
+    public <T> Optional<T> getOptionalValue(String propertyName, Class<T> propertyType) {
+        return Optional.ofNullable(getValue(propertyName, propertyType));
+    }
+    @Override
+    public Iterable<String> getPropertyNames() {
+        return configValues.keySet();
+    }
+    @Override
+    public Iterable<ConfigSource> getConfigSources() {
+        ConfigSource source = new ConfigSource() {
+            @Override
+            public Map<String, String> getProperties() {
+                return configValues;
+            }
+            @Override
+            public String getValue(String propertyName) {
+                return (String) configValues.get(propertyName);
+            }
+            @Override
+            public String getName() {
+                return "stub";
+            } 
+            
+            @Override
+            public Set<String> getPropertyNames() {
+                return configValues.keySet();
+            }
+        };
+        return Arrays.asList(source);
+    }
+    @Override
+    public ConfigValue getConfigValue(String propertyName) {
+        return null;
+    }
+    @Override
+    public <T> Optional<Converter<T>> getConverter(Class<T> forType) {
+        return Optional.empty();
+    }
+    
+    @Override
+    public <T> T unwrap(Class<T> type) {
+        throw new IllegalArgumentException("Unsupported type: " + type);
+    }
+}
diff --git a/systests/microprofile/client/jaxrs/src/test/java/org/apache/cxf/systest/microprofile/rest/client/MockConfigProviderResolver.java b/systests/microprofile/client/jaxrs/src/test/java/org/apache/cxf/systest/microprofile/rest/client/MockConfigProviderResolver.java
index e0bc64a..63cd466 100644
--- a/systests/microprofile/client/jaxrs/src/test/java/org/apache/cxf/systest/microprofile/rest/client/MockConfigProviderResolver.java
+++ b/systests/microprofile/client/jaxrs/src/test/java/org/apache/cxf/systest/microprofile/rest/client/MockConfigProviderResolver.java
@@ -18,67 +18,27 @@
  */
 package org.apache.cxf.systest.microprofile.rest.client;
 
-import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Optional;
 
 import org.eclipse.microprofile.config.Config;
 import org.eclipse.microprofile.config.spi.ConfigBuilder;
 import org.eclipse.microprofile.config.spi.ConfigProviderResolver;
-import org.eclipse.microprofile.config.spi.ConfigSource;
 
 public class MockConfigProviderResolver extends ConfigProviderResolver {
 
     private final Map<String, String> configValues;
     
-    private final Config config = new Config() {
-        @Override
-        public <T> T getValue(String propertyName, Class<T> propertyType) {
-            String value = configValues.get(propertyName);
-            System.out.println("getValue(" + propertyName + ") = " + value);
-            if (value != null) {
-                if (propertyType == String.class) {
-                    return propertyType.cast(value);
-                }
-                if (propertyType == Integer.class) {
-                    return propertyType.cast(Integer.parseInt(value));
-                }
-            }
-            return null;
-        }
-        @Override
-        public <T> Optional<T> getOptionalValue(String propertyName, Class<T> propertyType) {
-            return Optional.ofNullable(getValue(propertyName, propertyType));
-        }
-        @Override
-        public Iterable<String> getPropertyNames() {
-            return configValues.keySet();
-        }
-        @Override
-        public Iterable<ConfigSource> getConfigSources() {
-            ConfigSource source = new ConfigSource() {
-                @Override
-                public Map<String, String> getProperties() {
-                    return configValues;
-                }
-                @Override
-                public String getValue(String propertyName) {
-                    return (String) configValues.get(propertyName);
-                }
-                @Override
-                public String getName() {
-                    return "stub";
-                } };
-            return Arrays.asList(source);
-        } };
+    private final Config config;
 
     public MockConfigProviderResolver() {
         configValues = new HashMap<>();
+        config = new MockConfig(configValues);
     }
 
     public MockConfigProviderResolver(Map<String, String> configValues) {
         this.configValues = configValues;
+        this.config = new MockConfig(configValues);
     }
 
     public void setConfigValues(Map<String, String> configValues) {
diff --git a/systests/microprofile/client/weld/testng.xml b/systests/microprofile/client/weld/testng.xml
index 39df90d..e4c67d9 100644
--- a/systests/microprofile/client/weld/testng.xml
+++ b/systests/microprofile/client/weld/testng.xml
@@ -4,11 +4,11 @@
     <test name="All TCK Tests">
         <packages>
             <package name="org.eclipse.microprofile.rest.client.tck" />
-            <package name="org.eclipse.microprofile.rest.client.tck.asynctests" />
             <package name="org.eclipse.microprofile.rest.client.tck.cditests" />
-            <package name="org.eclipse.microprofile.rest.client.tck.sse" />
+            <package name="org.eclipse.microprofile.rest.client.tck.asynctests" />
+            <package name="org.eclipse.microprofile.rest.client.tck.sse" /> 
             <package name="org.eclipse.microprofile.rest.client.tck.ssl" />
-            <package name="org.eclipse.microprofile.rest.client.tck.timeout" />
+            <package name="org.eclipse.microprofile.rest.client.tck.timeout" /> 
         </packages>
     </test>
 </suite>


[cxf] 02/02: Recording .gitmergeinfo Changes

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 3.4.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 663a7689c72437c7e37ee83c85f0dc573d5d4db3
Author: reta <dr...@gmail.com>
AuthorDate: Fri Dec 11 16:29:40 2020 -0500

    Recording .gitmergeinfo Changes
---
 .gitmergeinfo | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitmergeinfo b/.gitmergeinfo
index 69e9a78..b1e2334 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -9,9 +9,11 @@ B c58d2cd38003a90608aa04e40756c042cbaf7e03
 B f5f08c838e1d52f17bcc8422fac38831a63e6e30
 M 1820f1a94b08ba840c3868ac3e1f3b7751540a08
 M 4162189dabdb22aec54dc3c5ae93cf42b0575d3d
+M 6a77819f4bc141fcddd53a36b178972f1f68fe97
 M 70c7d6a1e3f23522609d58b72b61c52e3cbc919a
 M 8c4f04855a5d8623daff2aa8a8856367879c624b
 M 9c17f2fb90a9929d0dc8e4f090da78547a4e7a02
 M 9df9b22a4032b19ea953600ebdfa84e8c15d2370
+M c0690e1fa57e0231461c9dd644d6b3c80852eef9
 M c0ef051466d775c84ddb20a9a12025d4258fb18b
 M fb7821164ec6d7fb98dc3f8caea67465db230a14