You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adam Heath <do...@brainfood.com> on 2010/02/17 21:19:29 UTC
Re: svn commit: r911164 - /ofbiz/branches/release09.04/framework/base/src/org/ofbiz/base/util/TimeDuration.java
adrianc@apache.org wrote:
> Author: adrianc
> Date: Wed Feb 17 20:10:53 2010
> New Revision: 911164
>
> URL: http://svn.apache.org/viewvc?rev=911164&view=rev
> Log:
> Hand-ported TimeDuration.java bug fixes from trunk:
>
> 1. Fixed a bug in TimeDuration.java reported by Adam Heath on the dev mailing list. The elapsed time constructor would produce an incorrect duration if either Calendar was prior to the epoch.
>
> 2. Fix for dealing with calendar dates that have a DAY value that is in the special window of 29-31.
Excellent, but...
>
> Modified:
> ofbiz/branches/release09.04/framework/base/src/org/ofbiz/base/util/TimeDuration.java
>
> Modified: ofbiz/branches/release09.04/framework/base/src/org/ofbiz/base/util/TimeDuration.java
> URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/base/src/org/ofbiz/base/util/TimeDuration.java?rev=911164&r1=911163&r2=911164&view=diff
> ==============================================================================
> --- ofbiz/branches/release09.04/framework/base/src/org/ofbiz/base/util/TimeDuration.java (original)
> +++ ofbiz/branches/release09.04/framework/base/src/org/ofbiz/base/util/TimeDuration.java Wed Feb 17 20:10:53 2010
> @@ -76,7 +83,7 @@
> return this.years == that.years && this.months == that.months && this.days == that.days
> && this.hours == that.hours && this.minutes == that.minutes && this.seconds == that.seconds
> && this.millis == that.millis;
> - } catch (Exception e) {}
> + } catch (ClassCastException e) {}
> return false;
> }
This change wasn't documented.
Running diff before commit can help with this(but it doesn't solve it).