I recommend using Class.cast () over @SuppressWarnings where possible.
There is no concern for performance here. If you have performance problems, the application profile, and I would be very surprised if this turned out to be a hot spot.
source
share