fix eclipse compilation errors

Eclipse complains about the object/int comparison. https://bugs.eclipse.org/bugs/show_bug.cgi?id=405732