svn commit: r1849742 - /ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressions.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1849742 - /ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressions.java

adityasharma
Author: adityasharma
Date: Wed Dec 26 08:41:50 2018
New Revision: 1849742

URL: http://svn.apache.org/viewvc?rev=1849742&view=rev
Log:
Improved: Refactor boolean returns for TemporalExpression methods
(OFBIZ-10732)
Improved boolean returns with a single statement, replacing if blocks with the explicit boolean return.
Improves code in includesDate().

Modified:
    ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressions.java

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressions.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressions.java?rev=1849742&r1=1849741&r2=1849742&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressions.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressions.java Wed Dec 26 08:41:50 2018
@@ -1510,10 +1510,7 @@ public class TemporalExpressions impleme
 
         @Override
         public boolean includesDate(Calendar cal) {
-            if (this.included.includesDate(cal)) {
-                return true;
-            }
-            return this.substitute.isSubstitutionCandidate(cal, this.excluded);
+            return this.included.includesDate(cal) || this.substitute.isSubstitutionCandidate(cal, this.excluded);
         }
 
         @Override