users@jsr311.java.net

Questions on Providers interface

From: Reto Bachmann-Gmür <reto_at_gmuer.ch>
Date: Thu, 21 Aug 2008 16:16:25 +0200

The interface Providers declares:

<T> ExceptionMapper<T> getExceptionMapper(java.lang.Class<T> type)

1. Why isn't T declared to extend Exceptions or Throwable?
2. If I understand things right the method may return the
ExceptionMapper for a superclass of type, so shouldn't either the return
value be ExceptionMapper<? super T> or the argument Class<? extends T> type?


Reto