Removed unnecessary casts reported in Eclipse Mars with JDK 1.8 as errors.
Was already merged in Bitbucket before import, marked as merged by the import user
There are about two dozens of unnecessary casts in the code. Although technically innocuous, they prevent the MercurialEclipse plugin from operating correctly in Eclipse Mars. There's no preference option in Errors/Warnings to make them appear as warnings. Therefore, I had to fix these so-called errors before working on bug #337 (closed). Technically, this is code cleaning.