Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-21109

[application wizard] 2 connections from same server but for different users result in project mismatch

XMLWordPrintable

      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

      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);
          }
      

      The problem is the clients are equals for both connections. A check for token equality should be performed to distinguish them

              fbricon@redhat.com Fred Bricon
              fbricon@redhat.com Fred Bricon
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: