hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haohui Mai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11529) Fix findbugs warnings in hadoop-archives
Date Mon, 02 Feb 2015 23:35:35 GMT

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

Haohui Mai commented on HADOOP-11529:
-------------------------------------

LGTM. Minor nit:

{code}
-        reader.close();
+        if (reader != null) {
+          reader.close();
+        }
{code}

You can use Java 7's try-with-resource statement here.

> Fix findbugs warnings in hadoop-archives
> ----------------------------------------
>
>                 Key: HADOOP-11529
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11529
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: tools
>            Reporter: Masatake Iwasaki
>            Assignee: Masatake Iwasaki
>            Priority: Minor
>         Attachments: HADOOP-11529.001.patch
>
>
> {code}
> NP	Possible null pointer dereference of reader in org.apache.hadoop.tools.HadoopArchives$HArchiveInputFormat.getSplits(JobConf,
int) on exception path
> Dm	Found reliance on default encoding in org.apache.hadoop.tools.HadoopArchives$HArchivesReducer.close():
String.getBytes()
> Dm	Found reliance on default encoding in org.apache.hadoop.tools.HadoopArchives$HArchivesReducer.configure(JobConf):
String.getBytes()
> Dm	Found reliance on default encoding in org.apache.hadoop.tools.HadoopArchives$HArchivesReducer.reduce(IntWritable,
Iterator, OutputCollector, Reporter): String.getBytes()
> {code}



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

Mime
View raw message