Hi, It looks to me like there are no obvious problems with changing the buffer > subclasses to use covariant overrides. As Alan mentioned, one API was > modified this way in 7, by Martin Buchholz. The discussion threads for this > change are [2] and [3]. It looks like Martin considered additional > covariant overrides, but ultimately backed off from this for a variety of > incidental reasons; see [4]. There is a certain amount of work here above > and beyond just changing the return types, but there don't appear to be any > fundamental issues.
So I've put a patch on cr at http://cr.openjdk.java.net/~rwarburton/buffer-overrides-0/. It also touches a couple of other classes which have unnecessary casts in. Aside from being a good idea, fixing the casts is also necessary due to -Werror. Let me know if I've missed anything or if there are any outstanding issues. I think the bugs that this resolves are: https://bugs.openjdk.java.net/browse/JDK-4774077 https://bugs.openjdk.java.net/browse/JDK-6451131 regards, Richard Warburton http://insightfullogic.com @RichardWarburto <http://twitter.com/richardwarburto>