Hi Florian,
Some time ago we discussed two different ways to add the new method
"getSelectedValuesList()". The first one is the current implementation
in your fix:
1. public List<E> getSelectedValuesList()
Benefits:
a. easy to use
b. Collection framework is very flexible
The second way is:
2. public E[] getSelectedValues(E[] a)
Benefits:
a. The same pattern used in the java.util.Collection#toArray(T[] a)
method
b. a little bit easer to port an old code
Also a lot of people noticed that there is no need to deprecate the
javax.swing.JList#getSelectedValues method because it still can be useful.
Any ideas?
Regards, Pavel
Hi Pavel, hi Alexander,
I'm back from holiday.
What is the status of this patch? Any news?
-Florian
Alexander Potochkin schrieb:
Hello Florian
Great! :-)
In the case of other issues please note that I'm on holiday until the
end of next week.
Have a nice holiday!
(I am reviewing the fix right now)
Thanks
alexp
-Florian
Pavel Porvatov schrieb:
Hi Florian,
Hi Pavel,
I agree that we should avoid to mix several different fixes in one
fix, but since in this fix we change
AbstractListModel to AbstractListModel<E>
and
JList(ListModel dataModel) to JList(ListModel<E> dataModel)
I think we should also change usages of AbstractListModel such as
"this (new AbstractListModel()...)" to "this (new
AbstractListModel<E>()...)" to avoid warnings.
Ok, then it will not be a problem. Let's include this change in your
fix. Therefore all my comments are gone and I'm going to start our
internal process to commit your fix.
Thanks, Pavel.
If you don't agree:
There are several places where I changed the usage of now
generified classes to the generic variant. Which ones should I
change back? Only this case?