This doesn't have to do with the types or null-ness of objects going into
the map, but rather with the implementaiton internals of LinkedHashSet.

LinkedHashMap . addNewEntry, line 193:

http://www.google.com/codesearch/p?hl=ru#cZwlSNS7aEw/libcore/luni/src/main/java/java/util/LinkedHashMap.java&q=LinkedEntry%20lang:java&l=193

LinkedEntry extends HashMapEntry:

http://www.google.com/codesearch/p?hl=ru#cZwlSNS7aEw/libcore/luni/src/main/java/java/util/LinkedHashMap.java&q=LinkedEntry%20lang:java&l=148

Definition of "table", whose element is assigned to:

http://www.google.com/codesearch/p?hl=ru#cZwlSNS7aEw/libcore/luni/src/main/java/java/util/HashMap.java&q=LinkedEntry%20lang:java&d=7&l=94

an array of HashMap$HashMapEntry

Based on the above, the assignment at line 193 should succeed. Might this be
a Java runtime bug?

.... of course if that's actually the version of java.util.* that is used in
Android 3.0.1.

But it looks reasonable, given that 1) the line number matches and 2) the
top of the page says this is a cached copy of source.android.com.

-- Kostya
2011/5/27 Streets Of Boston <flyingdutc...@gmail.com>

> Debug it.
> put getCell(i) into a variable and see what that variable is.
> And it seems that during run-time something is about to be stored in a
> LinkedHash*Map* (and not in LinkedHashSet as shown in your code).
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to