You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/02/28 06:47:00 UTC

[jira] [Commented] (KYLIN-3836) Kylin StringUtil.join() may cause NPE if iterator is empty

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

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

Wayne1c commented on pull request #493: KYLIN-3836 fix Kylin StringUtil.join() may cause NPE if iterator is e…
URL: https://github.com/apache/kylin/pull/493
 
 
   …mpty
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Kylin StringUtil.join() may cause NPE if iterator is empty
> ----------------------------------------------------------
>
>                 Key: KYLIN-3836
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3836
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: Chao Long
>            Assignee: Chao Long
>            Priority: Major
>             Fix For: v2.6.1
>
>
> {quote}
> public static String join(Iterable<String> parts, String separator) {
>     StringBuilder buf = new StringBuilder();
>     Iterator<String> iterator = parts.iterator();
>     if (iterator == null || (!iterator.hasNext())) {
>         return null;
>     }
> {quote}
> org.apache.kylin.job.exception.ExecuteException: org.apache.kylin.job.exception.ExecuteException: java.lang.NullPointerException
>  at org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:183)
>  at org.apache.kylin.job.impl.threadpool.DefaultScheduler$JobRunner.run(DefaultScheduler.java:114)
>  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  at java.lang.Thread.run(Thread.java:748)
>  Caused by: org.apache.kylin.job.exception.ExecuteException: java.lang.NullPointerException
>  at org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:183)
>  at org.apache.kylin.job.execution.DefaultChainedExecutable.doWork(DefaultChainedExecutable.java:71)
>  at org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:168)
>  ... 4 more
>  Caused by: java.lang.NullPointerException
>  at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
>  at com.google.common.base.Splitter.split(Splitter.java:383)
>  at org.apache.kylin.common.util.StringUtil.splitAndTrim(StringUtil.java:181)
>  at org.apache.kylin.source.hive.GarbageCollectionStep.getIntermediateTables(GarbageCollectionStep.java:95)
>  at org.apache.kylin.source.hive.GarbageCollectionStep.cleanUpIntermediateFlatTable(GarbageCollectionStep.java:62)
>  at org.apache.kylin.source.hive.GarbageCollectionStep.doWork(GarbageCollectionStep.java:48)
>  at org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:168)
>  ... 6 more



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)