This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
You've done nothing wrong; all pre-Tiger Java code of any complexity will elicit these warnings when compiled with JDK 1.5. What's happened is that there is a new way to use the container classes. Here is a document that will introduce you to generics.
Note that you can't have it both ways! Code that won't give these warnings under Tiger, won't compile at all under older JDKs. This is an irreversible change once you start down that road.