jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject Re: svn commit: r1513811 - in /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http: control/gui/ sampler/
Date Wed, 14 Aug 2013 13:20:01 GMT
On 14 August 2013 13:20, Milamber <> wrote:
> Le 14/08/2013 13:00, sebb a ecrit :
>> This is simpler, but I still think there are some unnecessary
>> conversions between index and name.
>> It seems to me that the dropdown index can be used directly as the JMX
>> value.
>> Only the combo box actually needs to know the string values, and the
>> GUI code could do the translation from property to string.
>> The order of the strings is critical, but this is not currently
>> guaranteed as there is no relationship between the SOURCE_TYPE_*
>> constants and the order of adding the strings to the ArrayList. (That
>> was one way in which the old code was better).
>> We could use set(index, String) instead of add(String); that would
>> guarantee tie the index to the String and guarantee the correct
>> ordering.
>> However, from the point of view of using the selected source type in
>> code, it would be better to use an enum.
>> If the enum stored the property name, this could be used by the GUI to
>> derive the text.
>> The enum entry could be derived from the index using
>> SourceType.values()[index]
>> Any objections if I make the changes suggested above?
> Perhaps we can fix this bug with the same method?

I'll take a look.

View raw message