Skip to content

Commit 0763536

Browse files
dragonpooludomikula
authored andcommitted
Fix null pointer exception of query execution
1 parent 511d57c commit 0763536

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/query/service/QueryExecutionServiceImpl.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import reactor.core.publisher.Mono;
2121

2222
import java.time.Duration;
23+
import java.util.HashMap;
2324
import java.util.List;
2425
import java.util.Map;
2526
import java.util.concurrent.TimeoutException;
@@ -81,7 +82,12 @@ private Mono<QueryExecutionResult> executeLocally(Datasource datasource, Map<Str
8182
private Mono<QueryExecutionResult> executeByNodeJs(Datasource datasource, Map<String, Object> queryConfig, Map<String, Object> requestParams, QueryVisitorContext queryVisitorContext) {
8283
List<Map<String, Object>> context = requestParams.entrySet()
8384
.stream()
84-
.map(entry -> Map.of("key", entry.getKey(), "value", entry.getValue()))
85+
.map(entry -> {
86+
Map<String, Object> temp = new HashMap<>();
87+
temp.put("key", entry.getKey());
88+
temp.put("value", entry.getValue()); // Allows null values
89+
return temp;
90+
})
8591
.collect(Collectors.toList());
8692

8793
//forward cookies to js datasource

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy