Greetings Andre. 

We don't use a Map for anything other than assuming that the map will guarantee uniqueness, which is checked by the validators for the inputs to the UI. 

So since we never actually need to check for uniqueness when pulling directly from the back-end, since it is assumed to be the corrected list of variables already, I have introduced a List, which doesn't require the users of a call to getEnvironmentVariables() to have to do extra work simply to get out the list. 

We don't do any "Map" datastructure optimized work on the map that is returned to the UI at all, so it makes more sense just to return a list. (I think that the Wizard is dependant upon calls to loadEnvironmentVariables(), however, I didn't want to change this since a call to IApplication.getEnvironmentVariables() will be a simple change, where necessary. 

Respectfully, 



Martes G Wigglesworth 
Consultant - Middleware Engineer 
Red Hat Consulting 
Red Hat, Inc. 
Office Phone: 804 343 6084 - 8136084 
Office Email: mwiggles@redhat.com 

----- Original Message -----

From: "André Dietisheim" <notifications@github.com> 
To: "openshift/openshift-java-client" <openshift-java-client@noreply.github.com> 
Cc: "Martes Wigglesworth" <mwigglesworth@redhat.com> 
Sent: Tuesday, November 5, 2013 4:39:51 AM 
Subject: Re: [openshift-java-client] [JBIDE-15744]: Added support for List<IEnvironmentVariable> to IApplication interface, as well as other side-effect changes. (#97) 



In src/main/java/com/openshift/client/IApplication.java: 
>  	 */
> -	public Map<String, IEnvironmentVariable> getEnvironmentVariables() throws OpenShiftSSHOperationException;
> +	public List<IEnvironmentVariable> getEnvironmentVariables() throws OpenShiftSSHOperationException; 


Why would we expose a list where the environment variables actually behave like a map (key/value-pairs, unique keys)? At first sight this wont make a lot of sense to me. 

— 
Reply to this email directly or view it on GitHub .