Merge "Issue #2709 Fix for recurring subscription active period end." into omaha_14.2.1
Former-commit-id:2b53723507
[formerly 6f332c96aabf76c51d1ebb2bbb671ae14df8e408] Former-commit-id:e416759c3c
This commit is contained in:
commit
63156262bb
1 changed files with 3 additions and 2 deletions
|
@ -66,6 +66,7 @@ import com.raytheon.uf.common.time.util.TimeUtil;
|
|||
* Jan 08, 2014 2615 bgonzale Implement calculate start and calculate end methods.
|
||||
* Jan 14, 2014 2459 mpduff Add subscription state.
|
||||
* Jan 20, 2013 2398 dhladky Fixed rescheduling beyond active period/expired window.
|
||||
* Jan 24, 2013 2709 bgonzale Fix setting of active period end.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -469,7 +470,7 @@ public abstract class RecurringSubscription<T extends Time, C extends Coverage>
|
|||
// active period values are month and day of month only, use base
|
||||
// Calendar for active period year
|
||||
Calendar activePeriodEndCal = TimeUtil.newCalendar(activePeriodEnd);
|
||||
TimeUtil.maxCalendarFields(activePeriodEndCal, Calendar.MILLISECOND,
|
||||
TimeUtil.minCalendarFields(activePeriodEndCal, Calendar.MILLISECOND,
|
||||
Calendar.SECOND, Calendar.MINUTE, Calendar.HOUR_OF_DAY);
|
||||
activePeriodEndCal.set(Calendar.YEAR, base.get(Calendar.YEAR));
|
||||
return activePeriodEndCal;
|
||||
|
@ -496,7 +497,7 @@ public abstract class RecurringSubscription<T extends Time, C extends Coverage>
|
|||
boolean hasActivePeriodEnd = activePeriodEnd != null;
|
||||
if (hasActivePeriodEnd) {
|
||||
realEnd = getActivePeriodEnd(endConstraint);
|
||||
if (realEnd.before(endConstraint)) {
|
||||
if (realEnd.after(endConstraint)) {
|
||||
realEnd = endConstraint;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue