Updates JavaDoc and Exception message to match the actual implementation