code: public static CredentialsConfig getPreferredDeployer(DeployerOverrider deployerOverrider, ArtifactoryServer server) {
          if (deployerOverrider.isOverridingDefaultDeployer()) {
              CredentialsConfig deployerCredentialsConfig = deployerOverrider.getDeployerCredentialsConfig();
              if (deployerCredentialsConfig != null) {
                  return deployerCredentialsConfig;
              }
          }
  
          if (server != null) {
              CredentialsConfig deployerCredentials = server.getDeployerCredentialsConfig();
              if (deployerCredentials != null) {
                  return deployerCredentials;
              }
          }
  
          return CredentialsConfig.EMPTY_CREDENTIALS_CONFIG;
      }
docs: Decides and returns the preferred deployment credentials to use from this builder settings and selected server
  
  @param deployerOverrider Deploy-overriding capable builder
  @param server            Selected Artifactory server
  @return Preferred deployment credentials