A DESCRIPTION OF THE REQUEST :
Raw types are needed for backwards compatibility, but this only applies to legacy types (such as collections). This request is for a compiler extension that would recognize a class annotation (@NoRaw) and emit a compile-time error message if the annotated class is invoked without a type parameter.
JUSTIFICATION :
Writing a new generic type that may be invoked using raw types requires significant defensive programming that would not be necessary if client use of raw types was forbidden. Implementing this RFE would allow a new generic type to be written in a simpler fashion.
The request is effectively an attempt to get closer to how generic types might be implemented had the need for backwards compatibility not been paramount. This need does not exist for newly-written generic types.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
As above.
CUSTOMER SUBMITTED WORKAROUND :
Write defensive code.
###@###.### 2005-07-18 10:07:41 GMT