geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1827276 - in /geronimo/specs/trunk/geronimo-jaxrs_2.1_spec/src/main/java/javax/ws/rs/sse: SseEventSource.java SseFinder.java
Date Tue, 20 Mar 2018 08:13:39 GMT
Author: rmannibucau
Date: Tue Mar 20 08:13:39 2018
New Revision: 1827276

URL: http://svn.apache.org/viewvc?rev=1827276&view=rev
Log:
GERONIMO-6602 ensure to use the right spi for SseEventSource.Builder and defaulting to cxf
impl instead of the api which can't be used

Modified:
    geronimo/specs/trunk/geronimo-jaxrs_2.1_spec/src/main/java/javax/ws/rs/sse/SseEventSource.java
    geronimo/specs/trunk/geronimo-jaxrs_2.1_spec/src/main/java/javax/ws/rs/sse/SseFinder.java

Modified: geronimo/specs/trunk/geronimo-jaxrs_2.1_spec/src/main/java/javax/ws/rs/sse/SseEventSource.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.1_spec/src/main/java/javax/ws/rs/sse/SseEventSource.java?rev=1827276&r1=1827275&r2=1827276&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.1_spec/src/main/java/javax/ws/rs/sse/SseEventSource.java
(original)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.1_spec/src/main/java/javax/ws/rs/sse/SseEventSource.java
Tue Mar 20 08:13:39 2018
@@ -29,7 +29,7 @@ public interface SseEventSource extends
 
     abstract class Builder {
 
-        public static final String JAXRS_DEFAULT_SSE_BUILDER_PROPERTY = "javax.ws.rs.sse.SseEventSource.Builder";
+        public static final String JAXRS_DEFAULT_SSE_BUILDER_PROPERTY = "org.apache.cxf.jaxrs.sse.client.SseEventSourceBuilderImpl";
 
         protected Builder() {
         }

Modified: geronimo/specs/trunk/geronimo-jaxrs_2.1_spec/src/main/java/javax/ws/rs/sse/SseFinder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.1_spec/src/main/java/javax/ws/rs/sse/SseFinder.java?rev=1827276&r1=1827275&r2=1827276&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.1_spec/src/main/java/javax/ws/rs/sse/SseFinder.java
(original)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.1_spec/src/main/java/javax/ws/rs/sse/SseFinder.java
Tue Mar 20 08:13:39 2018
@@ -36,7 +36,7 @@ final class SseFinder {
 
     private static final Logger LOGGER = Logger.getLogger(SseFinder.class.getName());
 
-    private static final String FACTORY_ID = SseEventSource.Builder.class.getName().replace('$',
'.');
+    private static final String FACTORY_ID = SseEventSource.Builder.class.getName();
 
     private static final String SERVICE_ID = "META-INF/services/" + FACTORY_ID;
 
@@ -49,12 +49,20 @@ final class SseFinder {
                 return delegate;
             }
 
-            InputStream is;
+            InputStream is = null;
             if (classLoader == null) {
                 is = ClassLoader.getSystemResourceAsStream(SERVICE_ID);
             } else {
                 is = classLoader.getResourceAsStream(SERVICE_ID);
             }
+            if (is == null) {
+                final String dottedId = SERVICE_ID.replace('$', '.');
+                if (classLoader == null) {
+                    is = ClassLoader.getSystemResourceAsStream(dottedId);
+                } else {
+                    is = classLoader.getResourceAsStream(dottedId);
+                }
+            }
 
             if (is != null) {
                 final BufferedReader rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));



Mime
View raw message