[ 
https://issues.apache.org/jira/browse/CALCITE-5819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17741180#comment-17741180
 ] 

Julian Hyde commented on CALCITE-5819:
--------------------------------------

[~lemonjing], Can you provide a PR to remove the use of the library altogether?

It seems that {{CollectionsUtil}} is only used in a few places in the InnoDb 
adapter, and the only methods used are {{isEmpty}} and {{{}isNotEmpty{}}}.

The only difference between {{CollectionUtils.isEmpty(list)}} and 
{{list.isEmpty()}} is the behavior if {{list}} is null. Modern coding practices 
would ensure that {{list}} is not null unless specified in its type.

So, use of {{CollectionUtils}} is making our code worse.

> Upgrade commons-collections from 3.x to 4.4
> -------------------------------------------
>
>                 Key: CALCITE-5819
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5819
>             Project: Calcite
>          Issue Type: Improvement
>          Components: innodb-adapter
>    Affects Versions: 1.34.0
>            Reporter: Ran Tao
>            Assignee: Ran Tao
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.35.0
>
>         Attachments: image-2023-07-06-15-11-47-855.png
>
>
> First, Apache commons-collections 3.x is a Java 1.3 compatible version, and 
> it does not use Java 5 generics. Apache commons-collections4 4.4 is an 
> upgraded version of commons-collections and it built by Java 8.
> The Apache Spark has same issue: [https://github.com/apache/spark/pull/35257]
>  
> !image-2023-07-06-15-11-47-855.png!



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

Reply via email to