FINERACT-822 enable JodaPlusMinusLong error

This commit is contained in:
percyashu
2020-06-14 13:59:05 +02:00
committed by Michael Vorburger ⛑️
parent 7c6b15e3bc
commit 4b46f27253
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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",
@@ -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()