Unnecessary Casts (UC)

Description:

UC detects if type cast operator can be safely removed. This message is issued in cases where Java compiler will automatically generate type conversion (for instance, a conversion from a type to that same type which is permitted for any type).

Example:

   public void f(int p) {
       int i = (int)p;
   }