[ https://issues.apache.org/jira/browse/HADOOP-6796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874437#action_12874437 ]
Jakob Homan commented on HADOOP-6796: ------------------------------------- bq. You could also modify Path to accept Path("") or Path(null) so that instead of throwing an exception they silently convert to Path("/") Nope - silent conversions are evil. The current patch is probably the best way to go, although this new behavior needs to be documented thoroughly. The general rule of thumb with anything implementing writable is caveat utilitor - let the user beware. Because of the write and readFields methods as well as the default constructor, it's always best practice to verify the state of the instance you're dealing with. > 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.