mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-11-29 18:38:32 +08:00
pre commit 2.11.0.2
This commit is contained in:
parent
3b37bac06f
commit
ccd449893a
@ -1,5 +1,13 @@
|
|||||||
# 🚀 版本日志
|
# 🚀 版本日志
|
||||||
|
|
||||||
|
### 2.11.0.2-beta (2024-01-02)
|
||||||
|
|
||||||
|
### 🐞 解决BUG、优化功能
|
||||||
|
|
||||||
|
1. 【all】修复 环境变量为 null 是未忽略
|
||||||
|
|
||||||
|
------
|
||||||
|
|
||||||
### 2.11.0.1-beta (2024-01-02)
|
### 2.11.0.1-beta (2024-01-02)
|
||||||
|
|
||||||
### 🐣 新增功能
|
### 🐣 新增功能
|
||||||
|
@ -90,6 +90,10 @@ public class EnvironmentMapBuilder {
|
|||||||
Map<String, String> map = new LinkedHashMap<>(this.map.size());
|
Map<String, String> map = new LinkedHashMap<>(this.map.size());
|
||||||
for (Map.Entry<String, Item> entry : this.map.entrySet()) {
|
for (Map.Entry<String, Item> entry : this.map.entrySet()) {
|
||||||
Item entryValue = entry.getValue();
|
Item entryValue = entry.getValue();
|
||||||
|
if (entryValue.value == null) {
|
||||||
|
// 值不能为 null
|
||||||
|
continue;
|
||||||
|
}
|
||||||
map.put(entry.getKey(), entryValue.value);
|
map.put(entry.getKey(), entryValue.value);
|
||||||
}
|
}
|
||||||
Optional.ofNullable(appendMap).ifPresent(objectMap -> {
|
Optional.ofNullable(appendMap).ifPresent(objectMap -> {
|
||||||
|
@ -256,15 +256,17 @@ public class StringUtil {
|
|||||||
return MapUtil.newHashMap();
|
return MapUtil.newHashMap();
|
||||||
}
|
}
|
||||||
List<Tuple> collect = envStrList.stream()
|
List<Tuple> collect = envStrList.stream()
|
||||||
.map(StrUtil::trim)
|
.map(StrUtil::trim)
|
||||||
.filter(s -> !StrUtil.isEmpty(s) && !StrUtil.startWith(s, "#"))
|
.filter(s -> !StrUtil.isEmpty(s) && !StrUtil.startWith(s, "#"))
|
||||||
.map(s -> {
|
.map(s -> {
|
||||||
List<String> list1 = StrUtil.splitTrim(s, "=");
|
List<String> list1 = StrUtil.splitTrim(s, "=");
|
||||||
if (CollUtil.size(list1) != 2) {
|
if (CollUtil.size(list1) != 2) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return new Tuple(list1.get(0), list1.get(1));
|
return new Tuple(list1.get(0), list1.get(1));
|
||||||
}).filter(Objects::nonNull).collect(Collectors.toList());
|
})
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.collect(Collectors.toList());
|
||||||
return CollStreamUtil.toMap(collect, objects -> objects.get(0), objects -> objects.get(1));
|
return CollStreamUtil.toMap(collect, objects -> objects.get(0), objects -> objects.get(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user