You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2017/12/14 01:54:00 UTC
[jira] [Comment Edited] (HDFS-7101) Potential null dereference in
DFSck#doWork()
[ https://issues.apache.org/jira/browse/HDFS-7101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15124972#comment-15124972 ]
Ted Yu edited comment on HDFS-7101 at 12/14/17 1:53 AM:
--------------------------------------------------------
Agreed.
was (Author: yuzhihong@gmail.com):
Agree.
> Potential null dereference in DFSck#doWork()
> --------------------------------------------
>
> Key: HDFS-7101
> URL: https://issues.apache.org/jira/browse/HDFS-7101
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 2.5.1
> Reporter: Ted Yu
> Assignee: skrho
> Priority: Minor
> Labels: BB2015-05-TBR
> Attachments: HDFS-7101.v1.patch, HDFS-7101_001.patch
>
>
> {code}
> String lastLine = null;
> int errCode = -1;
> try {
> while ((line = input.readLine()) != null) {
> ...
> if (lastLine.endsWith(NamenodeFsck.HEALTHY_STATUS)) {
> errCode = 0;
> {code}
> If readLine() throws exception, lastLine may be null, leading to NPE.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org