openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1773424 - /openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java
Date Fri, 09 Dec 2016 16:17:39 GMT
Author: rmannibucau
Date: Fri Dec  9 16:17:39 2016
New Revision: 1773424

URL: http://svn.apache.org/viewvc?rev=1773424&view=rev
Log:
using application/json for default providers, not sure why i used the old johnzon value

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java?rev=1773424&r1=1773423&r2=1773424&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java
Fri Dec  9 16:17:39 2016
@@ -24,6 +24,7 @@ import javax.json.stream.JsonGenerator;
 import javax.servlet.ServletContext;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
 import javax.ws.rs.ext.Provider;
 import java.util.Collection;
 import java.util.HashMap;
@@ -173,16 +174,8 @@ public class MeecrowaveBus implements Bu
     }
 
     @Provider
-    @Produces({
-            "application/json", "*/json",
-            "*/*+json", "*/x-json",
-            "*/javascript", "*/x-javascript"
-    })
-    @Consumes({
-            "application/json", "*/json",
-            "*/*+json", "*/x-json",
-            "*/javascript", "*/x-javascript"
-    })
+    @Produces(MediaType.APPLICATION_JSON)
+    @Consumes(MediaType.APPLICATION_JSON)
     public static class ConfiguredJsonbJaxrsProvider<T> extends JsonbJaxrsProvider<T>
{
         private ConfiguredJsonbJaxrsProvider(final String encoding,
                                              final boolean nulls,
@@ -202,16 +195,8 @@ public class MeecrowaveBus implements Bu
     }
 
     @Provider
-    @Produces({
-            "application/json", "*/json",
-            "*/*+json", "*/x-json",
-            "*/javascript", "*/x-javascript"
-    })
-    @Consumes({
-            "application/json", "*/json",
-            "*/*+json", "*/x-json",
-            "*/javascript", "*/x-javascript"
-    })
+    @Produces(MediaType.APPLICATION_JSON)
+    @Consumes(MediaType.APPLICATION_JSON)
     public static class ConfiguredJsrProvider extends DelegateProvider<JsonStructure>
{ // TODO: probably wire the encoding in johnzon
         private ConfiguredJsrProvider(final String bufferStrategy, final int maxStringLen,
                                       final int maxReadBufferLen, final int maxWriteBufferLen,



Mime
View raw message