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:13:03 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 1cb545acd -> 435a0c7da


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/435a0c7d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/435a0c7d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/435a0c7d

Branch: refs/heads/master
Commit: 435a0c7dad8c4e8c15a6bf39f469cce2047fa365
Parents: 1cb545a
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:12: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/435a0c7d/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 e019cf9..02e0863 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
@@ -22,7 +22,6 @@ package org.apache.cxf.transport.websocket.atmosphere;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.OutputStream;
-import java.util.Deque;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.logging.Level;
@@ -246,12 +245,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