simplify isJdk5Enum method and deprecate it