From: SourceForge.net <no...@so...> - 2010-07-28 20:23:16
|
Bugs item #3022501, was opened at 2010-06-28 15:04 Message generated for change (Comment added) made by blaschke-oss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=712784&aid=3022501&group_id=128809 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Java Client (JSR48) Group: Code Cleanup >Status: Pending Resolution: Fixed Priority: 5 Private: No Submitted By: Dave Blaschke (blaschke-oss) Assigned to: Dave Blaschke (blaschke-oss) Summary: Possible integer overflow in getTotalUSec Initial Comment: Bug: Result of integer multiplication cast to long Pattern id: ICAST_INTEGER_MULTIPLY_CAST_TO_LONG, type: ICAST, category: STYLE This code performs integer multiply and then converts the result to a long, as in: long convertDaysToMilliseconds(int days) { return 1000*3600*24*days; } If the multiplication is done using long arithmetic, you can avoid the possibility that the result will overflow. For example, you could fix the above code to: long convertDaysToMilliseconds(int days) { return 1000L*3600*24*days; } ---------------------------------------------------------------------- Comment By: Dave Blaschke (blaschke-oss) Date: 2010-07-28 15:23 Message: The community review has completed and we received no substantial critisism. Therefore the patch has been approved and merged into the "HEAD" branch. The next release will pick it up. ---------------------------------------------------------------------- Comment By: Dave Blaschke (blaschke-oss) Date: 2010-06-30 09:39 Message: Patch sent for community review. During a 2 week period any exploiter may comment on the patch, request changes or turn it down completely (with good reason). For the time being the patch is part of the "Experimental" branch in CVS. ---------------------------------------------------------------------- Comment By: Dave Blaschke (blaschke-oss) Date: 2010-06-28 15:06 Message: Fixing this eliminates 1 FindBugs issue ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=712784&aid=3022501&group_id=128809 |