[ 
https://issues.apache.org/jira/browse/KYLIN-5731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17798419#comment-17798419
 ] 

ASF GitHub Bot commented on KYLIN-5731:
---------------------------------------

thy950523 commented on code in PR #2161:
URL: https://github.com/apache/kylin/pull/2161#discussion_r1430893586


##########
src/common-server/src/main/java/org/apache/kylin/rest/controller/NEpochController.java:
##########
@@ -48,7 +51,11 @@ public class NEpochController extends NBasicController {
     @PostMapping(value = "", produces = { HTTP_VND_APACHE_KYLIN_JSON, 
HTTP_VND_APACHE_KYLIN_V4_PUBLIC_JSON })
     @ResponseBody
     public EnvelopeResponse<String> updateEpochOwner(@RequestBody EpochRequest 
epochRequest) {
-        checkCollectionRequiredArg("projects", epochRequest.getProjects());
+        if (Objects.isNull(epochRequest.getProjects())) {
+            // Avoid following NPEs.
+            epochRequest.setProjects(new ArrayList<>(0));
+        }
+        // Empty projects has specified meanings: all projects do change epoch.

Review Comment:
   这个issue是修复,projects参数为null情况下的NPE问题。
   





> When there is a null value in the Kafka source data, the build job reports an 
> error
> -----------------------------------------------------------------------------------
>
>                 Key: KYLIN-5731
>                 URL: https://issues.apache.org/jira/browse/KYLIN-5731
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: 5.0-beta
>            Reporter: zhong.zhu
>            Assignee: zhong.zhu
>            Priority: Minor
>             Fix For: 5.0.0
>
>
> If the field value in kafka json data is null, the task will report an error.
> Null value field "clue_source_2_name":null
> Field type is varchar
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to