Community
Participate
Working Groups
Build Identifier: 20110615-0604 DStoreShellService.getHostEnvironment() will return an empty array if called immediately after connecting Reproducible: Always Steps to Reproduce: Create a RSE connection configured to use the DStore shell subsystem. Execute the following code: for(ISubSystem subSystem : host.getSubSystems()) { if(subSystem instanceof IShellServiceSubSystem) { try { if(!subSystem.isConnected()) { IConnectorService connectorService = subSystem.getConnectorService(); connectorService.acquireCredentials(false); connectorService.connect(monitor); } IShellService shellService = ((IShellServiceSubSystem)subSystem).getShellService(); shellService.getHostEnvironment(); } catch(Exception e) { PluginLog.logError(e); } } } If the connection was disconnected the call to getHostEnvironment will return an empty array. If called after a few seconds, it will properly return the environment variables. If a call to isInitialized() is made right after connecting, it will return false. Looking at the DStoreShellService source code, it seems that all other public methods call waitForInitialize, while getHostEnvironment does not.
Created attachment 203008 [details] patch to waitForInitialize() before getting the host env Could you check if this patch fixes the issue?
I've committed the change to the HEAD stream.