You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2010/02/17 06:16:49 UTC
svn commit: r910828 -
/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java
Author: doogie
Date: Wed Feb 17 05:16:48 2010
New Revision: 910828
URL: http://svn.apache.org/viewvc?rev=910828&view=rev
Log:
In isZero(), remove useless check for this == ZeroTimeDuration, as the
latter overrides the isZero method, so the comparison never succeeds.
Modified:
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java?rev=910828&r1=910827&r2=910828&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java Wed Feb 17 05:16:48 2010
@@ -112,9 +112,9 @@
* @return <code>true</code> if this duration is zero
*/
public boolean isZero() {
- return this == ZeroTimeDuration || (this.millis == 0 && this.seconds == 0 &&
+ return this.millis == 0 && this.seconds == 0 &&
this.minutes == 0 && this.hours == 0 && this.days == 0 &&
- this.months == 0 && this.years == 0);
+ this.months == 0 && this.years == 0;
}
/** Returns the milliseconds in this time duration. */