You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "xuanzhang gong (Jira)" <ji...@apache.org> on 2024/10/10 09:33:00 UTC
[jira] [Updated] (KAFKA-17761) Omit generics using type inference
[ https://issues.apache.org/jira/browse/KAFKA-17761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
xuanzhang gong updated KAFKA-17761:
-----------------------------------
Description:
If the compiler can do type inference, generics should not be written in diamond blocks.
For example:
List<String> list = new ArrayList<String>();
we should remove "String".
Correct writing is :
List<String> list = new ArrayList<>();
BTW:There are about 1500 such problems in kafka
was:
If the compiler can do type inference, generics should not be written in diamond blocks.
For example:
List<String> list = new ArrayList<String>();
we should remove "String".
Correct writing is :
List<String> list = new ArrayList<>();
> Omit generics using type inference
> ----------------------------------
>
> Key: KAFKA-17761
> URL: https://issues.apache.org/jira/browse/KAFKA-17761
> Project: Kafka
> Issue Type: Sub-task
> Reporter: xuanzhang gong
> Assignee: xuanzhang gong
> Priority: Major
>
> If the compiler can do type inference, generics should not be written in diamond blocks.
> For example:
> List<String> list = new ArrayList<String>();
> we should remove "String".
> Correct writing is :
> List<String> list = new ArrayList<>();
>
> BTW:There are about 1500 such problems in kafka
--
This message was sent by Atlassian Jira
(v8.20.10#820010)