findbugs casts and dereference warnings