[ 
https://issues.apache.org/jira/browse/FINERACT-2945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Saghy reassigned FINERACT-2945:
------------------------------------

    Assignee: Senesh Perera

> Resolve [unchecked] compilation warnings in fineract-loan tests 
> (LoanChargeServiceTaxTest, LoanTransactionDataTest)
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: FINERACT-2945
>                 URL: https://issues.apache.org/jira/browse/FINERACT-2945
>             Project: Apache Fineract
>          Issue Type: Improvement
>            Reporter: Senesh Perera
>            Assignee: Senesh Perera
>            Priority: Minor
>              Labels: compilation-warnings
>
> Part of the ongoing effort to reduce compiler warnings across the codebase 
> (see FINERACT-959 and FINERACT-1790).
> While compiling test classes in the fineract-loan module (./gradlew 
> :fineract-loan:compileTestJava --rerun-tasks), 11 [unchecked] compiler 
> warnings are reported across two test files:
> 1. org.apache.fineract.portfolio.loanaccount.service.LoanChargeServiceTaxTest:
> - Warning: warning: [unchecked] unchecked generic array creation for varargs 
> parameter of type Map<TaxComponent,BigDecimal>[] (lines 212-213)
> - Fix: Replace the varargs .thenReturn(map1, map2) call with equivalent 
> chained .thenReturn(map1).thenReturn(map2) stubbing.
> 2. org.apache.fineract.portfolio.loanaccount.data.LoanTransactionDataTest:
> - Warning: 10 instances of warning: [unchecked] unchecked conversion caused 
> by raw mock(List.class) and mock(Collection.class) calls assigned to 
> parameterized variables (lines 92-97, 251, 281, 283, 309).
> - Fix: Replace raw mock(List.class) and mock(Collection.class) calls with 
> Mockito's type-inferred mock(), updating the local variable declaration on 
> lines 95-97 from Collection<...> to List<...> so the runtime mock type 
> remains 100% identical without needing @SuppressWarnings.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to