Hmm, maybe I should have another blog for Java geeking. What happened was, I had an ArrayList<String> and for a variety of reasons I decided to turn it into a HashMap<String,String>. After I’d fixed everything up, I got the weirdest NullPointerException, and I traced it to a call that looked like (x is the HashMap)
if ((x.size() > 0) && x.get(0).equals(foo))
and somehow the compiler had decided that get(0) was a reasonable thing to do to a HashMap<String,String>. Uh, strong typing, anyone?


ongoing
software · G & M · Dad author · colophon · rights
picture of the day
Around June 09, 2005: On Time · Royals 8, Giants 1 · Down & Out in Tulsa · COOL BIZ · NetBeans Notes

What?
· Technology (61 fragments)
· · Java (93 more)


Serif · Sans-Serif
I work at Sun Microsystems. The opinions expressed here are my own, and neither Sun nor any other party necessarily agrees with them.