river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: Space/outrigger suggestions
Date Sun, 19 Dec 2010 15:36:43 GMT
On Sun, Dec 19, 2010 at 11:28 PM, Wade Chandler
<hwadechandler-apache@yahoo.com> wrote:

> Adding some type checks like Peter and Nick mentioned on the types used in
> lookup I believe would work there to fix that.

FTR, I just commented on "What is possible" in the generics type
system, and have far too little understanding of the nuances at work
here, and am of no opinion of what should really be done.

Also, check the java.util.Map implementation and notice that all that
could have been the generic type is not... I have always wondered why,
but never found any good answer. For instance;

HashMap<String, String> m = ...
m.get( (Integer) 123 );

is not a problem, since the declaration is get( Object key ) and not
get( K key );

Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/24svnvk
I relax here; http://tinyurl.com/2cgsug

View raw message