You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Christian Geisert (JIRA)" <ji...@apache.org> on 2014/04/23 22:02:16 UTC
[jira] [Updated] (OFBIZ-5196) TemporalExpressions$DayOfWeekRange:
copy+paste logic errors
[ https://issues.apache.org/jira/browse/OFBIZ-5196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Geisert updated OFBIZ-5196:
-------------------------------------
Component/s: framework
> TemporalExpressions$DayOfWeekRange: copy+paste logic errors
> -----------------------------------------------------------
>
> Key: OFBIZ-5196
> URL: https://issues.apache.org/jira/browse/OFBIZ-5196
> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Affects Versions: SVN trunk
> Reporter: Russell Morrisey
>
> TemporalExpressions$DayOfWeekRange contains incorrect code which appears to be copied-and-pasted from DayOfMonthRange. It adds months to the calendar object, where weeks or days should be used.
> Example (TemporalExpressions.java, 412-419):
> @Override
> public Calendar first(Calendar cal) {
> Calendar first = (Calendar) cal.clone();
> while (!includesDate(first)) {
> first.add(Calendar.DAY_OF_MONTH, 1); //This is wrong
> }
> return first;
> }
> This problem appears in several places throughout this inner class.
--
This message was sent by Atlassian JIRA
(v6.2#6252)