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

Gopal V commented on HIVE-8090:
-------------------------------

Nice, that's what I meant - null implies no modifications.

I will need to re-format your changes for this patch, please submit patches 
with no extra whitespace and following the hive code guidelines.

{code}
if(modifiers == null) return this;
{code}

should be 

{code}
if (modifiers == null) {
  return this;
}
{code}

I'll pick this up next week and commit after a re-test.

> Potential null pointer reference in WriterImpl#StreamFactory#createStream()
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-8090
>                 URL: https://issues.apache.org/jira/browse/HIVE-8090
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.14.0
>            Reporter: Ted Yu
>         Attachments: HIVE-8090.1.patch, HIVE-8090.2.patch, HIVE-8090.3.patch
>
>
> {code}
>       switch (kind) {
> ...
>       default:
>         modifiers = null;
>         break;
>       }
>       BufferedStream result = streams.get(name);
>       if (result == null) {
>         result = new BufferedStream(name.toString(), bufferSize,
>             codec == null ? codec : codec.modify(modifiers));
> {code}
> In case modifiers is null and codec is ZlibCodec, there would be NPE in 
> ZlibCodec#modify(EnumSet<Modifier> modifiers) :
> {code}
>     for (Modifier m : modifiers) {
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to