cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject cxf git commit: Fix pmd error
Date Fri, 13 Nov 2015 17:43:02 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 16feba3f0 -> 4ced4ae4f


Fix pmd error


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

Branch: refs/heads/master
Commit: 4ced4ae4f31f34ac5e2f98e52ab91b3aee701f43
Parents: 16feba3
Author: Daniel Kulp <dkulp@apache.org>
Authored: Fri Nov 13 12:42:45 2015 -0500
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Nov 13 12:42:45 2015 -0500

----------------------------------------------------------------------
 .../websocket/atmosphere/DefaultProtocolInterceptor.java    | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/4ced4ae4/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 3dde4b5..1a2cd9a 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
@@ -286,25 +286,28 @@ public class DefaultProtocolInterceptor extends AtmosphereInterceptorAdapter
{
     // a workaround to flush the header data upon close when no write operation occurs  
     private class WrappedAtmosphereResponse extends AtmosphereResponse {
         final AtmosphereResponse response;
-        final ServletOutputStream delegate;
         ServletOutputStream sout;
         WrappedAtmosphereResponse(AtmosphereResponse resp, AtmosphereRequest req) throws
IOException {
             super((HttpServletResponse)resp.getResponse(), null, req, resp.isDestroyable());
             response = resp;
             response.request(req);
-            delegate = super.getOutputStream();
         }
 
         @Override
         public ServletOutputStream getOutputStream() throws IOException {
             if (sout == null) {
-                sout = new BufferedServletOutputStream();
+                sout = new BufferedServletOutputStream(super.getOutputStream());
             }
             return sout;
         }
         
         private final class BufferedServletOutputStream extends ServletOutputStream {
+            final ServletOutputStream delegate;
             CachedOutputStream out = new CachedOutputStream();
+            
+            BufferedServletOutputStream(ServletOutputStream d) {
+                delegate = d;
+            }
 
             OutputStream getOut() {
                 if (out == null) {


Mime
View raw message