Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339084 - NPE when adding a ContinuationListener to Servlet3Continuation
Summary: NPE when adding a ContinuationListener to Servlet3Continuation
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: other (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 7.2.x   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-07 08:23 EST by Frank Lyaruu CLA
Modified: 2011-04-04 03:02 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).