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

openshift-java-client: don't refresh env variables on each addition/removal

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.5.0
    • None
    • None

    Description

      When adding/removing environment variables, the openshift-java-client would always request the backend for the full list. This should not be required and avoided

      ApplicationResource#addEnvironmentVariable
      		EnvironmentVariableResourceDTO environmentVariableResourceDTO =
      				new AddEnvironmentVariableRequest().execute(name, value);
      		IEnvironmentVariable environmentVariable = new EnvironmentVariableResource(environmentVariableResourceDTO, this);
      		updateEnvironmentVariables();
      		return environmentVariable;
      
      ApplicationResource#updateEnvironmentVariables
      	protected void updateEnvironmentVariables() throws OpenShiftException {
      		if (environmentVariableByName == null) {
      			environmentVariableByName = loadEnvironmentVariables();
      		} else {
      			environmentVariableByName.clear();
      			environmentVariableByName.putAll(loadEnvironmentVariables());
      		}
      	}
      

      Attachments

        Issue Links

          Activity

            People

              adietish@redhat.com André Dietisheim
              adietish@redhat.com André Dietisheim
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: