cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/2] cxf git commit: Fix pmd error
Date Fri, 13 Nov 2015 17:44:51 GMT
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/f831e9f5
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f831e9f5
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f831e9f5

Branch: refs/heads/3.1.x-fixes
Commit: f831e9f5ee56bff9e4472782300f9558ba234f80
Parents: efac3c9
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:44:44 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/f831e9f5/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