mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 23:05:47 +02:00
[227881] [dstore][threaded] There is no chance to set client object for getUserPreferencesDirectory()
This commit is contained in:
parent
7c9bd1b6dd
commit
2280c34837
1 changed files with 10 additions and 3 deletions
|
@ -4398,14 +4398,21 @@ public final class DataStore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is used to set the Client object for each user.
|
* 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
|
* @param client the object of the Client class
|
||||||
*/
|
*/
|
||||||
public void setClient(Client client)
|
public void setClient(Client client)
|
||||||
{
|
{
|
||||||
// the most likely scenario here is that _client is null since
|
// if client is not null, then this method gets called once.
|
||||||
// setClient() is the only way to make the client not null
|
// subsequent calls will have no effect.
|
||||||
if (client != _client){
|
if (_client == null){
|
||||||
_client = client;
|
_client = client;
|
||||||
_userPreferencesDirectory = null;
|
_userPreferencesDirectory = null;
|
||||||
getUserPreferencesDirectory();
|
getUserPreferencesDirectory();
|
||||||
|
|
Loading…
Add table
Reference in a new issue