On 12/18/2010 01:10 PM, Peter wrote:
On 12/18/2010 12:43 PM, Peter wrote:
If we check the bytecode for instanceof checks and type casts, using
ASM, we could insert a type check and a handler that throws a checked
exception.

Before we start adding a extra dependency to the solution, shouldn't we
study the impact of plain generics first?

No harm in studying the symptoms I suppose.

The worst problem is unchecked type casts, if someone can find a way of 
checking them, then the symptoms go away.

Just to verify, we are talking about generics for a situation like this are we?

    public <T extends Entry> T get( T entry )
    {
        return (T) new Entry();
    }


Reply via email to