1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-03 22:35:43 +02:00

[227881] [dstore][threaded] There is no chance to set client object for getUserPreferencesDirectory()

This commit is contained in:
David McKnight 2008-04-22 18:03:45 +00:00
parent 7c9bd1b6dd
commit 2280c34837

View file

@ -4398,14 +4398,21 @@ public final class DataStore
/**
* This method is used to set the Client object for each user.
* The _client variable is null until setClient() is called. After
* _client is set, it can not be changed.
*
* This method should only be called once to associate a particular
* client with a DataStore. By default, the client for the user of
* the DataStore process is set but, when there is an ISystemService,
* the daemon sets the client.
*
* @param client the object of the Client class
*/
public void setClient(Client client)
{
// the most likely scenario here is that _client is null since
// setClient() is the only way to make the client not null
if (client != _client){
// if client is not null, then this method gets called once.
// subsequent calls will have no effect.
if (_client == null){
_client = client;
_userPreferencesDirectory = null;
getUserPreferencesDirectory();