Upgrade ErrorProne from 2.4.0 to 2.5.1 (FINERACT-1297)
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
6be352fc74
commit
8bff783c5d
+4
-3
@@ -495,15 +495,15 @@ configure(project.fineractJavaProjects) {
|
||||
// Configuration for the errorprone plugin
|
||||
// https://github.com/tbroyer/gradle-errorprone-plugin
|
||||
dependencies {
|
||||
errorprone "com.google.errorprone:error_prone_core:2.4.0"
|
||||
errorprone "com.google.errorprone:error_prone_core:2.5.1"
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.errorprone {
|
||||
disableWarningsInGeneratedCode = true
|
||||
excludedPaths = ".*/build/.*"
|
||||
//Todo Remove necessary checks from this list
|
||||
disable(
|
||||
// TODO Remove disabled checks from this list, by fixing remaining usages
|
||||
"UnusedVariable",
|
||||
"TypeParameterUnusedInFormals",
|
||||
"JdkObsolete",
|
||||
@@ -513,8 +513,8 @@ configure(project.fineractJavaProjects) {
|
||||
"ReturnFromVoid",
|
||||
"AlmostJavadoc",
|
||||
"InvalidBlockTag",
|
||||
"JavaUtilDate", // TODO FINERACT-1298
|
||||
)
|
||||
//TODO gradually enable these checks
|
||||
error(
|
||||
"DefaultCharset",
|
||||
"RemoveUnusedImports",
|
||||
@@ -586,6 +586,7 @@ configure(project.fineractJavaProjects) {
|
||||
"ModifiedButNotUsed",
|
||||
"InconsistentCapitalization",
|
||||
"MissingOverride",
|
||||
// TODO enable these remaining checks (one by one)
|
||||
// "InvalidBlockTag",
|
||||
// "InconsistentOverloads",
|
||||
// "MethodCanBeStatic",
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ public class CurrencyData implements Serializable {
|
||||
return false;
|
||||
}
|
||||
CurrencyData that = (CurrencyData) o;
|
||||
return Objects.equals(decimalPlaces, that.decimalPlaces) && Objects.equals(code, that.code) && Objects.equals(name, that.name)
|
||||
return (decimalPlaces == that.decimalPlaces) && Objects.equals(code, that.code) && Objects.equals(name, that.name)
|
||||
&& Objects.equals(inMultiplesOf, that.inMultiplesOf) && Objects.equals(displaySymbol, that.displaySymbol)
|
||||
&& Objects.equals(nameCode, that.nameCode) && Objects.equals(displayLabel, that.displayLabel);
|
||||
}
|
||||
|
||||
+10
-11
@@ -264,17 +264,17 @@ public final class CalendarData implements Serializable {
|
||||
final String location = null;
|
||||
final LocalDate startDate = null;
|
||||
final LocalDate endDate = null;
|
||||
final Integer duration = Integer.valueOf(0);
|
||||
final Integer duration = 0;
|
||||
final EnumOptionData type = CalendarEnumerations.calendarType(CalendarType.COLLECTION);
|
||||
final boolean repeating = false;
|
||||
final String recurrence = null;
|
||||
final EnumOptionData frequency = CalendarEnumerations.calendarFrequencyType(CalendarFrequencyType.DAILY);
|
||||
final Integer interval = Integer.valueOf(1);
|
||||
final Integer interval = 1;
|
||||
final EnumOptionData repeatsOnDay = CalendarEnumerations.calendarWeekDaysType(CalendarWeekDaysType.MO);
|
||||
final EnumOptionData repeatsOnNthDayOfMonth = CalendarEnumerations.calendarFrequencyNthDayType(NthDayType.ONE);
|
||||
final EnumOptionData remindBy = CalendarEnumerations.calendarRemindBy(CalendarRemindBy.EMAIL);
|
||||
final Integer firstReminder = Integer.valueOf(0);
|
||||
final Integer secondReminder = Integer.valueOf(0);
|
||||
final Integer firstReminder = 0;
|
||||
final Integer secondReminder = 0;
|
||||
final String humanReadable = null;
|
||||
final Collection<LocalDate> recurringDates = null;
|
||||
final Collection<LocalDate> nextTenRecurringDates = null;
|
||||
@@ -516,13 +516,12 @@ public final class CalendarData implements Serializable {
|
||||
return false;
|
||||
}
|
||||
CalendarData that = (CalendarData) o;
|
||||
return Objects.equals(repeating, that.repeating) && Objects.equals(id, that.id)
|
||||
&& Objects.equals(calendarInstanceId, that.calendarInstanceId) && Objects.equals(entityId, that.entityId)
|
||||
&& Objects.equals(entityType, that.entityType) && Objects.equals(title, that.title)
|
||||
&& Objects.equals(description, that.description) && Objects.equals(location, that.location)
|
||||
&& Objects.equals(startDate, that.startDate) && Objects.equals(endDate, that.endDate)
|
||||
&& Objects.equals(meetingTime, that.meetingTime) && Objects.equals(duration, that.duration)
|
||||
&& Objects.equals(type, that.type) && Objects.equals(recurrence, that.recurrence)
|
||||
return (repeating == that.repeating) && Objects.equals(id, that.id) && Objects.equals(calendarInstanceId, that.calendarInstanceId)
|
||||
&& Objects.equals(entityId, that.entityId) && Objects.equals(entityType, that.entityType)
|
||||
&& Objects.equals(title, that.title) && Objects.equals(description, that.description)
|
||||
&& Objects.equals(location, that.location) && Objects.equals(startDate, that.startDate)
|
||||
&& Objects.equals(endDate, that.endDate) && Objects.equals(meetingTime, that.meetingTime)
|
||||
&& Objects.equals(duration, that.duration) && Objects.equals(type, that.type) && Objects.equals(recurrence, that.recurrence)
|
||||
&& Objects.equals(frequency, that.frequency) && Objects.equals(interval, that.interval)
|
||||
&& Objects.equals(repeatsOnDay, that.repeatsOnDay) && Objects.equals(repeatsOnNthDayOfMonth, that.repeatsOnNthDayOfMonth)
|
||||
&& Objects.equals(remindBy, that.remindBy) && Objects.equals(firstReminder, that.firstReminder)
|
||||
|
||||
+2
-2
@@ -38,7 +38,7 @@ import org.apache.fineract.portfolio.calendar.data.CalendarData;
|
||||
public final class CenterData implements Serializable {
|
||||
|
||||
private final Long id;
|
||||
private String accountNo;
|
||||
private final String accountNo;
|
||||
private final String name;
|
||||
private final String externalId;
|
||||
private final Long officeId;
|
||||
@@ -276,7 +276,7 @@ public final class CenterData implements Serializable {
|
||||
return false;
|
||||
}
|
||||
CenterData that = (CenterData) o;
|
||||
return Objects.equals(active, that.active) && Objects.equals(id, that.id) && Objects.equals(accountNo, that.accountNo)
|
||||
return (active == that.active) && Objects.equals(id, that.id) && Objects.equals(accountNo, that.accountNo)
|
||||
&& Objects.equals(name, that.name) && Objects.equals(externalId, that.externalId) && Objects.equals(officeId, that.officeId)
|
||||
&& Objects.equals(officeName, that.officeName) && Objects.equals(staffId, that.staffId)
|
||||
&& Objects.equals(staffName, that.staffName) && Objects.equals(hierarchy, that.hierarchy)
|
||||
|
||||
+5
-6
@@ -721,10 +721,9 @@ public class SavingsAccountCharge extends AbstractPersistableCustom {
|
||||
return false;
|
||||
}
|
||||
SavingsAccountCharge that = (SavingsAccountCharge) o;
|
||||
return Objects.equals(penaltyCharge, that.penaltyCharge) && Objects.equals(paid, that.paid) && Objects.equals(waived, that.waived)
|
||||
&& Objects.equals(status, that.status) && Objects.equals(savingsAccount, that.savingsAccount)
|
||||
&& Objects.equals(charge, that.charge) && Objects.equals(chargeTime, that.chargeTime)
|
||||
&& dueDate.compareTo(that.dueDate) == 0
|
||||
return (penaltyCharge == that.penaltyCharge) && (paid == that.paid) && (waived == that.waived) && (status == that.status)
|
||||
&& Objects.equals(savingsAccount, that.savingsAccount) && Objects.equals(charge, that.charge)
|
||||
&& Objects.equals(chargeTime, that.chargeTime) && dueDate.compareTo(that.dueDate) == 0
|
||||
? Boolean.TRUE
|
||||
: Boolean.FALSE && Objects.equals(feeOnMonth, that.feeOnMonth) && Objects.equals(feeOnDay, that.feeOnDay)
|
||||
&& Objects.equals(feeInterval, that.feeInterval)
|
||||
@@ -800,7 +799,7 @@ public class SavingsAccountCharge extends AbstractPersistableCustom {
|
||||
|
||||
private LocalDate setDayOfMonth(LocalDate nextDueLocalDate) {
|
||||
int maxDayOfMonth = nextDueLocalDate.lengthOfMonth();
|
||||
int newDayOfMonth = (this.feeOnDay.intValue() < maxDayOfMonth) ? this.feeOnDay.intValue() : maxDayOfMonth;
|
||||
int newDayOfMonth = (this.feeOnDay.intValue() < maxDayOfMonth) ? this.feeOnDay : maxDayOfMonth;
|
||||
nextDueLocalDate = nextDueLocalDate.withDayOfMonth(newDayOfMonth);
|
||||
return nextDueLocalDate;
|
||||
}
|
||||
@@ -885,6 +884,6 @@ public class SavingsAccountCharge extends AbstractPersistableCustom {
|
||||
*
|
||||
*/
|
||||
public boolean canOverriteSavingAccountRules() {
|
||||
return !(this.isSavingsActivation() || this.isWithdrawalFee());
|
||||
return (!this.isSavingsActivation() && !this.isWithdrawalFee());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user