diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle index a8a697de4..4ab0d79fb 100644 --- a/fineract-provider/build.gradle +++ b/fineract-provider/build.gradle @@ -323,7 +323,6 @@ tasks.withType(JavaCompile) { "BadImport", "UnusedMethod", "ModifiedButNotUsed", - "JodaPlusMinusLong", "TypeParameterUnusedInFormals", "UnusedNestedClass", "UndefinedEquals", @@ -362,6 +361,7 @@ tasks.withType(JavaCompile) { "PrivateConstructorForNoninstantiableModule", "ClassNewInstance", "UnsafeFinalization", + "JodaPlusMinusLong", "MutableMethodReturnType", "SwitchDefault", "VarTypeName", diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformServiceImpl.java index d097a26f1..3924a083e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformServiceImpl.java @@ -60,6 +60,7 @@ import org.apache.fineract.infrastructure.security.service.PlatformSecurityConte import org.apache.fineract.portfolio.calendar.service.CalendarUtils; import org.apache.fineract.useradministration.domain.AppUser; import org.joda.time.DateTime; +import org.joda.time.Duration; import org.joda.time.LocalDate; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; @@ -351,7 +352,7 @@ public class ReportMailingJobWritePlatformServiceImpl implements ReportMailingJo // the recurrence pattern/rule cannot be empty if (StringUtils.isNotBlank(recurrencePattern) && startDateTime != null) { - final LocalDate nextDayLocalDate = startDateTime.plus(1).toLocalDate(); + final LocalDate nextDayLocalDate = startDateTime.plus(Duration.standardDays(1)).toLocalDate(); final LocalDate nextRecurringLocalDate = CalendarUtils.getNextRecurringDate(recurrencePattern, startDateTime.toLocalDate(), nextDayLocalDate); final String nextDateTimeString = nextRecurringLocalDate + " " + startDateTime.getHourOfDay() + ":" + startDateTime.getMinuteOfHour()