]
Marián Labuda updated JBIDE-21109:
----------------------------------
Fix Version/s: (was: 4.4.0.Alpha1)
[application wizard] 2 connections from same server but for different
users result in project mismatch
------------------------------------------------------------------------------------------------------
Key: JBIDE-21109
URL:
https://issues.jboss.org/browse/JBIDE-21109
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: openshift
Reporter: Fred Bricon
Assignee: Fred Bricon
Labels: application_wizard, upstream
Fix For: 4.3.1.Beta1
In JBT, connecting 2 users on the same server, results in wrong projects being shown for
the 2nd connection (in the new application wizard).
This is caused by calling Connection.ownResource(project), having
{code}
public boolean ownsResource(IResource resource) {
if (resource == null) {
return false;
}
IClient client = resource.accept(new CapabilityVisitor<IClientCapability,
IClient>() {
@Override
public IClient visit(IClientCapability capability) {
return capability.getClient();
}
}, null);
return ObjectUtils.equals(this.client, client);
}
{code}
The problem is the clients are equals for both connections. A check for token equality
should be performed to distinguish them