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

Bug 315116

Summary: Convert ArrayContentProvider to SessionSingleton
Product: [RT] RAP Reporter: Stefan Röck <stefan.roeck>
Component: JFaceAssignee: Project Inbox <rap-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: minor    
Priority: P3    
Version: 1.3   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Stefan Röck CLA 2010-05-31 12:56:10 EDT
After reading 314959 a remembered a strange implementation of JFace's ArrayContentProvider which has a public static getInstance() method to return a singleton instance (although a public ctor is visible as well).
Although this class has no state, extending classes potentially *could* have. In this case, the behavior between RCP and RAP is different as in RCP the state is hold per user, in RAP it is shared among all sessions. IMHO it makes sense to convert this to a session singleton, too.
Comment 1 Rüdiger Herrmann CLA 2010-05-31 14:08:33 EDT
Even though the class itself could be extended, I don't see how anyone could manipulate getInstance() to return something else than ArrayContentProvider.

Please re-open if you disagree.
Comment 2 Stefan Röck CLA 2010-06-01 03:19:19 EDT
You're right - I agree ;-)