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", "BadImport",
"UnusedMethod", "UnusedMethod",
"ModifiedButNotUsed", "ModifiedButNotUsed",
"JodaPlusMinusLong",
"TypeParameterUnusedInFormals", "TypeParameterUnusedInFormals",
"UnusedNestedClass", "UnusedNestedClass",
"UndefinedEquals", "UndefinedEquals",
@@ -362,6 +361,7 @@ tasks.withType(JavaCompile) {
"PrivateConstructorForNoninstantiableModule", "PrivateConstructorForNoninstantiableModule",
"ClassNewInstance", "ClassNewInstance",
"UnsafeFinalization", "UnsafeFinalization",
"JodaPlusMinusLong",
"MutableMethodReturnType", "MutableMethodReturnType",
"SwitchDefault", "SwitchDefault",
"VarTypeName", "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.portfolio.calendar.service.CalendarUtils;
import org.apache.fineract.useradministration.domain.AppUser; import org.apache.fineract.useradministration.domain.AppUser;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.Duration;
import org.joda.time.LocalDate; import org.joda.time.LocalDate;
import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.DateTimeFormatter;
@@ -351,7 +352,7 @@ public class ReportMailingJobWritePlatformServiceImpl implements ReportMailingJo
// the recurrence pattern/rule cannot be empty // the recurrence pattern/rule cannot be empty
if (StringUtils.isNotBlank(recurrencePattern) && startDateTime != null) { 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(), final LocalDate nextRecurringLocalDate = CalendarUtils.getNextRecurringDate(recurrencePattern, startDateTime.toLocalDate(),
nextDayLocalDate); nextDayLocalDate);
final String nextDateTimeString = nextRecurringLocalDate + " " + startDateTime.getHourOfDay() + ":" + startDateTime.getMinuteOfHour() final String nextDateTimeString = nextRecurringLocalDate + " " + startDateTime.getHourOfDay() + ":" + startDateTime.getMinuteOfHour()