Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339084

Summary: NPE when adding a ContinuationListener to Servlet3Continuation
Product: [RT] Jetty Reporter: Frank Lyaruu <frank>
Component: otherAssignee: Project Inbox <jetty-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: gregw
Version: unspecified   
Target Milestone: 7.2.x   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Frank Lyaruu CLA 2011-03-07 08:23:20 EST
Build Identifier: Jetty 8.0.0 M2

When deploying on a servlet 3.0 container, adding a ContinuationListener to a new Servlet3Continuation fails.

Around line 96 of Servlet3Continuation.java we see a faulty piece of code:

        if (_context==null)
            _context.addListener(wrapped);
        else
            _listeners.add(wrapped);

This will always fail when _context is null, I'd say it should be _context!=null

Reproducible: Always
Comment 1 Greg Wilkins CLA 2011-04-04 03:02:33 EDT
fixed in r2962 for 7.4.0.  Will migrate to jetty-8 soon after and will be in a M release (or a real release as soon as we get IP clearance on 2.2 JSP).