cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: [CXF-5428] response.getWriter() is called too early
Date Fri, 14 Mar 2014 10:40:25 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes e1fe0acfd -> 4bca1f2d9


[CXF-5428] response.getWriter() is called too early


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

Branch: refs/heads/2.7.x-fixes
Commit: 4bca1f2d9e6f856a69f8f7a0fb5673b04bc66116
Parents: e1fe0ac
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Fri Mar 14 10:38:44 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Fri Mar 14 10:40:06 2014 +0000

----------------------------------------------------------------------
 .../servlet/servicelist/ServiceListGeneratorServlet.java         | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/4bca1f2d/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/ServiceListGeneratorServlet.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/ServiceListGeneratorServlet.java
b/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/ServiceListGeneratorServlet.java
index 43a70dd..8912fb3 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/ServiceListGeneratorServlet.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/ServiceListGeneratorServlet.java
@@ -19,7 +19,6 @@
 package org.apache.cxf.transport.servlet.servicelist;
 
 import java.io.IOException;
-import java.io.PrintWriter;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -83,7 +82,6 @@ public class ServiceListGeneratorServlet extends HttpServlet {
             request.removeAttribute(ServletController.AUTH_SERVICE_LIST);
             request.removeAttribute(ServletController.AUTH_SERVICE_LIST_REALM);
         }
-        PrintWriter writer = response.getWriter();
         AbstractDestination[] destinations = destinationRegistry.getSortedDestinations();
         if (request.getParameter("stylesheet") != null) {
             renderStyleSheet(request, response);
@@ -123,7 +121,7 @@ public class ServiceListGeneratorServlet extends HttpServlet {
         }
         response.setContentType(serviceListWriter.getContentType());
         Object basePath = request.getAttribute(Message.BASE_PATH);
-        serviceListWriter.writeServiceList(writer,
+        serviceListWriter.writeServiceList(response.getWriter(),
                                            basePath == null ? null : basePath.toString(),
                                            soapEndpoints, restEndpoints);
     }


Mime
View raw message