Bug 49635 - org.apache.catalina.connector.RequestFacade has wrong implementation...
Summary: org.apache.catalina.connector.RequestFacade has wrong implementation...
Status: RESOLVED DUPLICATE of bug 49567
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Connectors (show other bugs)
Version: 7.0.0
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-21 23:58 UTC by shoichi mazda
Modified: 2010-07-22 02:08 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shoichi mazda 2010-07-21 23:58:10 UTC
I can't run a below code.

@WebServlet(urlPatterns={"/async"}, asyncSupported=true)
public class AsyncServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		AsyncContext context = request.startAsync(request, response);
		
		context.start(new Runnable() {
			@Override
			public void run() {
				System.out.println("async!!");
			}
		});
	}
}

It occur java.lang.StackOverflowError.

java.lang.StackOverflowError
	at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:963)
	at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:963)
	at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:963)
.
.
.

So, I think that org.apache.catalina.connector.RequestFacade has wrong implementation.I show part of source code in RequestFacade line number is 961 to 964.

public AsyncContext startAsync(ServletRequest request, ServletResponse response)
    throws IllegalStateException {
    return request.startAsync(request, response);
}

I think it should have "this." before "request" next "return".
Comment 1 Mark Thomas 2010-07-22 02:08:44 UTC
The analysis is wrong but there is an issue. The root cause is the same as the duplicate where a fix is currently being worked on.

*** This bug has been marked as a duplicate of bug 49567 ***