cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject cxf git commit: replace the old method usage with the new one
Date Tue, 05 Apr 2016 21:29:06 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes d7bdfe5f1 -> b4870788d


replace the old method usage with the new one


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b4870788
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b4870788
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b4870788

Branch: refs/heads/3.0.x-fixes
Commit: b4870788d04c2da796fac61f119d5f14298a508d
Parents: d7bdfe5
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Tue Apr 5 23:12:51 2016 +0200
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Tue Apr 5 23:16:51 2016 +0200

----------------------------------------------------------------------
 .../websocket/atmosphere/DefaultProtocolInterceptor.java     | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b4870788/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
index 867faae..5a188f4 100644
--- a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
+++ b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
@@ -21,7 +21,6 @@ package org.apache.cxf.transport.websocket.atmosphere;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
-import java.util.Deque;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.logging.Level;
@@ -160,12 +159,7 @@ public class DefaultProtocolInterceptor extends AtmosphereInterceptorAdapter
{
         AsyncIOWriter writer = res.getAsyncIOWriter();
 
         if (writer instanceof AtmosphereInterceptorWriter) {
-            //REVIST need a better way to add a custom filter at the first entry and not
at the last as
-            // e.g. interceptor(AsyncIOInterceptor interceptor, int position)
-            Deque<AsyncIOInterceptor> filters = AtmosphereInterceptorWriter.class.cast(writer).filters();
-            if (!filters.contains(interceptor)) {
-                filters.addFirst(interceptor);
-            }
+            AtmosphereInterceptorWriter.class.cast(writer).interceptor(interceptor, 0);
         }
     }
 


Mime
View raw message