- 博客(3)
- 收藏
- 关注
原创 Too many transfer-encoding issue
Problem we experiences error as pic shown when receiving response from backend service rm-client-backend, which serves as a proxy routing http call. Reason The reason the error above is happening is our service has been built with Golang 1.15+. Befor.
2022-04-12 14:20:53
505
原创 Arrays.asList 和 List.of 的区别
可变性 Arrays.asList 创建出来的list是可变的 (mutable list),另外,底层数据结构仍然是数组,因此数组更改会影响list的结果,并且不支持add,remove等操作 List.of 创建出来的list是不可变的 (immutable list) Null 元素 Arrays.asList 允许包含null List.of 不允许包含null ...
2021-09-29 10:53:16
1120
原创 orElse() 和 orElseGet()的区别
今天在项目中遇到了一个bug,代码情况类似如下: public RequestDto assemble(ItemInfo itemInfo, AdditionalData data) { return Optional.ofNullable(itemInfo) .map(item -> map1(item)) .orElse(map2(data))) } private RequestDto map1(Item
2021-08-17 21:24:48
618
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人