Posted by forax
on October 12, 2006 at 5:57 AM PDT
Is a bug that require to generify a class that can't be generified later is a showstopper for mustang ?
Recently a user named jirkahana post a topic on the java.net JDK forum about the fact that javax.xml.stream.XMLReader inherits from a non generified Iterator.
I've kickly sumbitted a bug report (6472193
and as i'm a jdk contributor, i've provided a patch that
correct the bug.
Now, we are late in the sceduling of mustang, and
only showstoppers bug can be corrected.
So here is my question, is this bug is a showstopper ?
When tiger introduces generics, some APIs likes java.util, java.lang
was retrofited to use them.
We are now in a post-tiger world,
it seems normal to think that all APIs of mustang
use generics but that is not the case, at least the package
javax.xml.stream was not apparently generified
when included in the source tree of the JDK.
You could answer that is not a big beal, we can generifed it later
like we already did with existing APIs.
Yes, we can retrofit the whole package but one class
will cause a backward compatibility issue.
And guess what, its javax.xml.stream.XMLReader.
XMLReader is an interface that extends Iterator, so each
implementation need to provide a code for the method next
that returns an Object. Now suppose that someone decides
to correct the bug after the official release of mustang.
XMLReader will be changed to extend from Iterator<XMLExvent>
thus the method next will need to return a XMLEvent and not
an Object. It will break all implementations of XMLReader.
In short, this bug is not fixable after the release of mustang.
So i ask the question, is bug 6472193 a showstopper ?