[
https://issues.apache.org/jira/browse/HADOOP-6796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12875199#action_12875199
]
Eli Collins commented on HADOOP-6796:
-------------------------------------
If it's never ok to pass null for the path (ie a bug in the code) then you can
assert path != null or throw an AssertionError. If it's OK sometimes and not
others than IllegalArgumentException seems appropriate, seems like it should
never be legitimate to create a FileStatus w/o a path unless using the no
argument constructor.
> FileStatus allows null srcPath but crashes if that's done
> ---------------------------------------------------------
>
> Key: HADOOP-6796
> URL: https://issues.apache.org/jira/browse/HADOOP-6796
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.22.0
> Reporter: Rodrigo Schmidt
> Assignee: Rodrigo Schmidt
> Priority: Minor
> Fix For: 0.22.0
>
> Attachments: HADOOP-6796.patch
>
>
> FileStatus allows constructor invocation with a null srcPath but many methods
> like write, readFields, compareTo, equals, and hashCode depend on this
> property.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.