On 08/29/2013 10:37 PM, John Arthorne wrote:
> From: Mickael Istria <[email protected]>
> I may have missed something, but wouldn't the following
> implementation be a valid solution?
>
> public E[] getElements(I inputElement) {
> return inputElement.toArray(new E[inputElement.size()]);
> }
You can't instantiate arrays of generic type. I think we're digging
into too low level detail for this list. I have entered this bug for
the particular issue of generic array return types in JFace:
But consumers won't use a generic type, they'll use the concrete type
for their implementation. So consumers won't see a new warning.
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
_______________________________________________
cross-project-issues-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev