opensource4you / astraea

釋放kafka的無限潛能
Apache License 2.0
129 stars 46 forks source link

檢查 `Collection` 是否為 null 或 空 #1745

Open chinghongfang opened 1 year ago

chinghongfang commented 1 year ago

我們時常會需要檢查一個 Collection 是否是 null 或 空集合,這時候可以把這些繁瑣檢查放到 Utils 中,

在 #1720 我們在 Utils 新增了一個檢查的方法,我們可以把專案內其他需要同時判斷 null 或 空 的用法,使用 Utils.requireNonEmpty() 替換。