File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/util Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 15
15
import java .util .Map ;
16
16
import java .util .Optional ;
17
17
import java .util .function .Consumer ;
18
+ import java .util .function .Predicate ;
18
19
import java .util .stream .Collectors ;
19
20
import java .util .stream .Stream ;
20
21
@@ -116,13 +117,7 @@ public static String filter(final Map<Object, Object> keyToValues) {
116
117
final Map <Object , Object > normalized = new HashMap <>(keyToValues )
117
118
.entrySet ()
118
119
.stream ()
119
- .map (e -> {
120
- if (e .getValue () instanceof Optional <?> opt ) {
121
- e .setValue (opt .orElse (null ));
122
- }
123
- return e ;
124
- })
125
- .filter (e -> !ObjectUtils .isEmpty (e ))
120
+ .filter (e -> !ObjectUtils .isEmpty (e .getValue ()))
126
121
.collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue ));
127
122
if (normalized .isEmpty ()) {
128
123
return null ;
You can’t perform that action at this time.
0 commit comments