cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject [cxf] 13/14: [CXF-7579] Mark the default mapper and json provider as non-custom.
Date Tue, 19 Dec 2017 20:27:04 GMT
This is an automated email from the ASF dual-hosted git repository.

johndament pushed a commit to branch mp-client
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit c7976063cb30d29bf992ae3b07a8324823d333c8
Author: John D. Ament <johndament@apache.org>
AuthorDate: Tue Dec 19 15:03:50 2017 -0500

    [CXF-7579] Mark the default mapper and json provider as non-custom.
---
 .../cxf/microprofile/client/JsonPProvider.java     | 26 ----------------------
 .../client/MicroProfileClientFactoryBean.java      | 25 +++++++++++----------
 2 files changed, 13 insertions(+), 38 deletions(-)

diff --git a/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/JsonPProvider.java
b/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/JsonPProvider.java
deleted file mode 100644
index 09bd122..0000000
--- a/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/JsonPProvider.java
+++ /dev/null
@@ -1,26 +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.cxf.microprofile.client;
-
-import javax.annotation.Priority;
-import org.apache.cxf.jaxrs.provider.jsrjsonp.JsrJsonpProvider;
-
-@Priority(Integer.MAX_VALUE)
-public class JsonPProvider extends JsrJsonpProvider {
-}
diff --git a/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/MicroProfileClientFactoryBean.java
b/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/MicroProfileClientFactoryBean.java
index e9a1767..eee6b74 100644
--- a/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/MicroProfileClientFactoryBean.java
+++ b/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/MicroProfileClientFactoryBean.java
@@ -18,16 +18,6 @@
  */
 package org.apache.cxf.microprofile.client;
 
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import javax.ws.rs.client.ClientRequestFilter;
-import javax.ws.rs.client.ClientResponseFilter;
-import javax.ws.rs.core.Configuration;
-
 import org.apache.cxf.common.util.ClassHelper;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.jaxrs.client.AbstractClient;
@@ -37,9 +27,20 @@ import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
 import org.apache.cxf.jaxrs.model.ClassResourceInfo;
 import org.apache.cxf.jaxrs.model.FilterProviderInfo;
 import org.apache.cxf.jaxrs.model.ProviderInfo;
+import org.apache.cxf.jaxrs.provider.jsrjsonp.JsrJsonpProvider;
 import org.apache.cxf.microprofile.client.proxy.MicroProfileClientProxyImpl;
 import org.eclipse.microprofile.rest.client.RestClientBuilder;
 
+import javax.ws.rs.client.ClientRequestFilter;
+import javax.ws.rs.client.ClientResponseFilter;
+import javax.ws.rs.core.Configuration;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
 public class MicroProfileClientFactoryBean extends JAXRSClientFactoryBean {
     private final Comparator<ProviderInfo<?>> comparator;
     private final List<Object> registeredProviders;
@@ -58,9 +59,9 @@ public class MicroProfileClientFactoryBean extends JAXRSClientFactoryBean
{
         registeredProviders = new ArrayList<>();
         registeredProviders.addAll(processProviders());
         if (!configuration.isDefaultExceptionMapperDisabled()) {
-            registeredProviders.add(new DefaultResponseExceptionMapper());
+            registeredProviders.add(new ProviderInfo<>(new DefaultResponseExceptionMapper(),getBus(),false));
         }
-        registeredProviders.add(new JsonPProvider());
+        registeredProviders.add(new ProviderInfo<>(new JsrJsonpProvider(),getBus(),false));
         super.setProviders(registeredProviders);
     }
 

-- 
To stop receiving notification emails like this one, please contact
"commits@cxf.apache.org" <commits@cxf.apache.org>.

Mime
View raw message