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

Daniel Stieglitz updated NIFI-14051:
------------------------------------
    Description: 
There are many instances in the code where explicit type arguments are used 
when instantiating an object e.g. 
{code:java}
Map<String, Object> expectedValues = new HashMap<String, Object>(){code}
This used to be necessary in older versions of the JDK but now this can be 
simplified to
{code:java}
Map<String, Object> expectedValues = new HashMap<>(){code}
This ticket aims to identify all such similar instantiations and replace them 
with  a diamond <>.

 

  was:
There are many instances in the code where explicit type arguments are used 
when instantiating an object e.g. 
{code:java}
Map<String, Object> expectedValues = new HashMap<String, Object>(){code}
This used to be necessary in older versions of the JDK but now this can be 
simplified to
{code:java}
Map<String, Object> expectedValues = new HashMap<>(){code}
This ticket aims to identify all such similar instantiations and replace them 
with  a diamond <>.

In addition there are many instances where there are anonymous classes and the 
code can be reduced using lambdas. This ticket aims to replace the use of 
anonymous classes with lambdas. 

 


> Explicit type arguments should be replaced by diamond and anonymous classes 
> should be replaced with lambdas
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-14051
>                 URL: https://issues.apache.org/jira/browse/NIFI-14051
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Daniel Stieglitz
>            Assignee: Daniel Stieglitz
>            Priority: Minor
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> There are many instances in the code where explicit type arguments are used 
> when instantiating an object e.g. 
> {code:java}
> Map<String, Object> expectedValues = new HashMap<String, Object>(){code}
> This used to be necessary in older versions of the JDK but now this can be 
> simplified to
> {code:java}
> Map<String, Object> expectedValues = new HashMap<>(){code}
> This ticket aims to identify all such similar instantiations and replace them 
> with  a diamond <>.
>  



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

Reply via email to