Bug 312691 - ConsoleSession.getService method does not save the service registration properly
Summary: ConsoleSession.getService method does not save the service registration properly
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.6   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.6 RC1   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-12 15:07 EDT by Thomas Watson CLA
Modified: 2010-05-12 15:21 EDT (History)
2 users (show)

See Also:
aniefer: review+


Attachments
patch (1.30 KB, patch)
2010-05-12 15:09 EDT, Thomas Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2010-05-12 15:07:26 EDT
In testing the patch in bug 312677 I found a bug in the ConsoleSession class in the framework.

The getService call has an incorrect null check against the sessionRegistration.  This prevents the ConsoleSession from ever saving the service registration.  As a result when the ConsoleSession is closed the service associated with the ConsoleSession is never unregistred.  If you open and close the osgi console several times you will see this by running the following command:

services (objectClass=*ConsoleSession)

This will list all the "dead" sessions that should have been unregisted.
Comment 1 Thomas Watson CLA 2010-05-12 15:09:42 EDT
Created attachment 168237 [details]
patch

Fixes the null check to correctly save the service registration.
Comment 2 Thomas Watson CLA 2010-05-12 15:10:19 EDT
Andrew please review.
Comment 3 Andrew Niefer CLA 2010-05-12 15:18:58 EDT
looks good.
Comment 4 Thomas Watson CLA 2010-05-12 15:21:13 EDT
Patch release for RC1.