Fix javac warnings.

 * Use superseding classes/methods instead of the deprecated ones
 * Suppress unchecked warnings where applicable

Signed-off-by: angelsl <hidingfromhidden@gmail.com>
Merge pull request #3 from angelsl/master

Fix basic javac warnings.