ObjectUtil 新增三个 defaultIfXxx 方法

This commit is contained in:
王良
2022-01-13 14:58:20 +08:00
parent c5673bb06b
commit b4cf5ec9e2
20 changed files with 73 additions and 23 deletions

View File

@@ -95,7 +95,7 @@ public class JSONArray implements JSON, JSONGetter<Integer>, List<Object>, Rando
*/
public JSONArray(int initialCapacity, JSONConfig config) {
this.rawList = new ArrayList<>(initialCapacity);
this.config = ObjectUtil.defaultIfNull(config, JSONConfig.create());
this.config = ObjectUtil.defaultIfNull(config, JSONConfig::create);
}
/**