You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2020/05/16 08:20:59 UTC
[incubator-pinot] 01/01: fixing template argument if not specify
values
This is an automated email from the ASF dual-hosted git repository.
xiangfu pushed a commit to branch fixing_groovy_templates_utils_npe
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
commit d0b851a232ebf054e0c3ab5713e6b9d8822e5088
Author: Xiang Fu <fx...@gmail.com>
AuthorDate: Sat May 16 01:20:32 2020 -0700
fixing template argument if not specify values
---
.../src/main/java/org/apache/pinot/spi/utils/GroovyTemplateUtils.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pinot-spi/src/main/java/org/apache/pinot/spi/utils/GroovyTemplateUtils.java b/pinot-spi/src/main/java/org/apache/pinot/spi/utils/GroovyTemplateUtils.java
index 5319b1d..f7d0375 100644
--- a/pinot-spi/src/main/java/org/apache/pinot/spi/utils/GroovyTemplateUtils.java
+++ b/pinot-spi/src/main/java/org/apache/pinot/spi/utils/GroovyTemplateUtils.java
@@ -57,6 +57,9 @@ public class GroovyTemplateUtils {
}
public static Map<String, Object> getTemplateContext(List<String> values) {
+ if (values == null) {
+ return Collections.emptyMap();
+ }
Map<String, Object> context = new HashMap<>();
for (String value : values) {
String[] splits = value.split("=", 2);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org