>we check for "event ID > 0" in a lot of places, but what does that mean? We >don't actually check it's a valid ID, do we? What would a negative ID tell us? >Parsing failure?
The DigitalOcean api does not return negative values, and the primitive int defaults to 0, so it is unlikely to be a negative value there. If there is a negative value it means the api returns it, but that behavior is not documented and not expected. Regarding the 'null' checks in the equals and hashcode methods, we've found that sometimes the API returns null values where it shouldn't. Although the constructors already check for the presence of those values, I'd rather keep the null checks in the hashcode and equals (those methods are specially sensible ones), to avoid breaking their contract by mistake if in a future we find we have to relax some field constraints. WDYT? Thanks for the review! I've addressed all the comments and hope to have the commit pushed soon :) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/49#issuecomment-33292187
