Sebastiaan van Erk <[EMAIL PROTECTED]> writes:
> He also discusses the difference between bounded wildcards and bounded 
> type parameters (one of the problems already encountered).

Yes, but he doesn't explain the issue that has left people confused. Bloch says:

"These two signatures have identical semantics
 - boolean addAll(Collection<? extends E> c);
 - <T extends E> boolean addAll(Collection<T> c);"

Once you add a type parameter to E, it either doesn't apply anymore or the
compilers are buggy. More specifically, these two are not the same according to
the eclipse compiler and javac:

- public final <C extends Page<?>> void setResponsePage(final Class<C> cls,
PageParameters parameters)
- public final void setResponsePage(final Class<? extends Page<?>> cls,
PageParameters parameters)

The former accepts some class literals that the latter does not.

Regards,
Ismael




Reply via email to