Uploaded image for project: 'OpenShift Java Client'
  1. OpenShift Java Client
  2. OSJC-228

Client mismatch resources from 2 connections from same server but for different users

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 3.1.0
    • 3.0.0
    • core
    • None

      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 equal for both connections. A check for token equality should be performed within DefaultClient.equals() to distinguish them

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

              Created:
              Updated:
              Resolved: