[
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)