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.
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?
-Florian
Pavel Porvatov schrieb:
Hi Florian,
Hi Pavel,
I had a look at your second comment:
2. In the JList class the body of the getElementAt method should not be
changed. It doesn't relative to the bug.
Which part do you mean exactly? (JList does not have a getElementAt
method)
I meant
public JList() {
this (
- new AbstractListModel() {
+ new AbstractListModel<E>() {
public int getSize() { return 0; }
- public Object getElementAt(int i) { return "No Data
Model"; }
+ public E getElementAt(int i) { throw new
IndexOutOfBoundsException("No Data Model"); }
}
);
}
We should avoid to mix several different fixes in an one fix.
Regards, Pavel.
-Florian
Am Montag, 30. März 2009 schrieben Sie:
Hi Florian,
I'm not sure you got notification about my comments of your bug report.
Please take a look at it.
Regards, Pavel.
Hi Pavel,
I created the bug report in the OpenJDK Bugzilla system:
https://bugs.openjdk.java.net/show_bug.cgi?id=100029
-Florian
Am Donnerstag, 26. März 2009 schrieb Pavel Porvatov:
Hi Florian,
> - Should I add a bug report for each planed patch (Generics:
JList,
Generics: JComboBox,...)
>> Yes > or is it fine to just file one report for sunbug=6179357,
which will be closed when we can close the sunbug?
>> Actually your patch doesn't relative to sunbug 6179357,
therefore
you should leave this field empty.
I don't understand. The whole swing-generics project started to fix:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6179357
TreeModel and ListModel have nothing in common. So your patch doesn't
relative to sunbug 6179357.
and the related
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6303622
I'm going to file another bug which will be more specific. Therefore
I'll be able to close it after generification of JList will be
completed. This way allows to track changes in the sources and
releases.
Regards, Pavel.
Why do you think the current work is not related?
-Florian
Pavel Porvatov schrieb:
Hi Florian,
OK, I'll do that as soon as I find some time (probably this week).
I just had shortly scanned the "Submit a patch" section and I have
some questions:
- Should I add a bug report for each planed patch (Generics:
JList,
Generics: JComboBox,...)
Yes
or is it fine to just file one report for sunbug=6179357, which
will
be closed when we can close the sunbug?
Actually your patch doesn't relative to sunbug 6179357,
therefore you
should leave this field empty.
- Should I set your username with the sponsor flag?
No
What is your username? :-)
I'll fill this field later
Thanks, Pavel.
-Florian
Pavel Porvatov schrieb:
Hi Florian,
Please take a look at the http://openjdk.java.net/contribute/
page,
especially at *Submit a patch* section. We are trying to
standardize
contribution process, so you should create a new bug report in
the
OpenJDK Bugzilla system and add your patch there.
Thanks, Pavel.
P.S. I'm looking at your patch regardless of a bug report, but
you
should create the bug report.
Hi,
so, here I prepared a first patch to "generify" JList, along
with:
AbstractListModel, DefaultListCellRenderer, DefaultListModel,
ListCellRenderer and ListModel.
-Florian