removing warnings

This commit is contained in:
Vishwas Babu A J
2015-05-05 07:12:10 -07:00
parent e4d231913b
commit 0ee38cfbc8
11 changed files with 21 additions and 29 deletions
@@ -112,8 +112,8 @@ public class AccountingRuleWritePlatformServiceJpaRepositoryImpl implements Acco
// get the GL Accounts or tags to Debit and Credit
final String[] debitTags = command.arrayValueOfParameterNamed(AccountingRuleJsonInputParams.DEBIT_ACCOUNT_TAGS.getValue());
final String[] creditTags = command.arrayValueOfParameterNamed(AccountingRuleJsonInputParams.CREDIT_ACCOUNT_TAGS.getValue());
final Set<String> incomingDebitTags = debitTags == null ? new HashSet<String>() : new HashSet<>(Arrays.asList(debitTags));
final Set<String> incomingCreditTags = creditTags == null ? new HashSet<String>() : new HashSet<>(Arrays.asList(creditTags));
final Set<String> incomingDebitTags = debitTags == null ? new HashSet<>() : new HashSet<>(Arrays.asList(debitTags));
final Set<String> incomingCreditTags = creditTags == null ? new HashSet<>() : new HashSet<>(Arrays.asList(creditTags));
final Long accountToDebitId = command.longValueOfParameterNamed(AccountingRuleJsonInputParams.ACCOUNT_TO_DEBIT.getValue());
final Long accountToCreditId = command.longValueOfParameterNamed(AccountingRuleJsonInputParams.ACCOUNT_TO_CREDIT.getValue());
@@ -7,7 +7,6 @@ package org.mifosplatform.portfolio.client.handler;
import org.mifosplatform.commands.annotation.CommandType;
import org.mifosplatform.commands.handler.NewCommandSourceHandler;
import org.mifosplatform.commands.provider.CommandHandlerProvider;
import org.mifosplatform.infrastructure.core.api.JsonCommand;
import org.mifosplatform.infrastructure.core.data.CommandProcessingResult;
import org.mifosplatform.portfolio.client.service.ClientWritePlatformService;
@@ -35,7 +35,6 @@ import org.springframework.data.jpa.domain.AbstractPersistable;
@Table(name = "m_loan_recalculation_details")
public class LoanInterestRecalculationDetails extends AbstractPersistable<Long> {
@SuppressWarnings("unused")
@OneToOne
@JoinColumn(name = "loan_id", nullable = false)
private Loan loan;
@@ -9,9 +9,8 @@ import org.mifosplatform.infrastructure.core.exception.AbstractPlatformDomainRul
public class LoanMultiDisbursementException extends AbstractPlatformDomainRuleException {
public LoanMultiDisbursementException(final String entity, final String defaultUserMessage,
final Object... defaultUserMessageArgs) {
super("error.msg." + defaultUserMessage,defaultUserMessage);
public LoanMultiDisbursementException(final String defaultUserMessage, final Object... defaultUserMessageArgs) {
super("error.msg." + defaultUserMessage, defaultUserMessage, defaultUserMessageArgs);
}
}
@@ -460,7 +460,6 @@ public class LoanRescheduleRequestWritePlatformServiceImpl implements LoanResche
boolean isHolidayEnabled = false;
WorkingDays workingDays = null;
LocalDate recalculateFrom = null;
LocalDate lastTransactionDate = null;
Long overdurPenaltyWaitPeriod = null;
if (loan.repaymentScheduleDetail().isInterestRecalculationEnabled()) {
restCalendarInstance = calendarInstanceRepository.findCalendarInstaneByEntityId(
@@ -2618,7 +2618,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
}
if (totalDisbursedAmount.compareTo(loan.getApprovedPrincipal()) == 0) {
final String errorMessage = "loan.disbursement.cannot.be.a.edited";
throw new LoanMultiDisbursementException(LoanApiConstants.disbursementDataParameterName, errorMessage);
throw new LoanMultiDisbursementException(errorMessage);
}
}
@@ -2632,12 +2632,12 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
LocalDate expectedDisbursementDate = loan.getExpectedDisbursedOnLocalDate();
if (!loan.loanProduct().isMultiDisburseLoan()) {
final String errorMessage = "loan.product.does.not.support.multiple.disbursals";
throw new LoanMultiDisbursementException(LoanApiConstants.disbursementDataParameterName, errorMessage);
throw new LoanMultiDisbursementException(errorMessage);
}
if(loan.isSubmittedAndPendingApproval() || loan.isClosed() || loan.isClosedWrittenOff() || loan.status().isClosedObligationsMet() ||
loan.status().isOverpaid()){
if (loan.isSubmittedAndPendingApproval() || loan.isClosed() || loan.isClosedWrittenOff() || loan.status().isClosedObligationsMet()
|| loan.status().isOverpaid()) {
final String errorMessage = "cannot.modify.tranches.if.loan.is.pendingapproval.closed.overpaid.writtenoff";
throw new LoanMultiDisbursementException(LoanApiConstants.disbursementDataParameterName, errorMessage);
throw new LoanMultiDisbursementException(errorMessage);
}
validateMultiDisbursementData(command, expectedDisbursementDate);
@@ -31,7 +31,6 @@ import org.springframework.data.jpa.domain.AbstractPersistable;
@Table(name = "m_product_loan_recalculation_details")
public class LoanProductInterestRecalculationDetails extends AbstractPersistable<Long> {
@SuppressWarnings("unused")
@OneToOne
@JoinColumn(name = "product_id", nullable = false)
private LoanProduct loanProduct;
@@ -5,10 +5,7 @@
*/
package org.mifosplatform.portfolio.paymenttype.api;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@@ -272,7 +272,7 @@ public class DepositAccountData {
}
public Collection<SavingsAccountChargeData> charges() {
return (this.charges == null) ? new HashSet<SavingsAccountChargeData>() : this.charges;
return (this.charges == null) ? new HashSet<>() : this.charges;
}
public EnumOptionData depositType() {
@@ -469,6 +469,6 @@ public class SavingsAccountData {
}
public Collection<SavingsAccountChargeData> charges() {
return (this.charges == null) ? new HashSet<SavingsAccountChargeData>() : this.charges;
return (this.charges == null) ? new HashSet<>() : this.charges;
}
}
@@ -2309,7 +2309,7 @@ public class SavingsAccount extends AbstractPersistable<Long> {
}
public Set<SavingsAccountCharge> charges() {
return (this.charges == null) ? new HashSet<SavingsAccountCharge>() : this.charges;
return (this.charges == null) ? new HashSet<>() : this.charges;
}
public void validateAccountValuesWithProduct() {