hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Wang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-10876) The constructor of Path should not take an empty URL as a parameter
Date Mon, 28 Jul 2014 22:09:38 GMT

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

Andrew Wang commented on HADOOP-10876:
--------------------------------------

Hi Zhihai, thanks for working on this. Patch looks good, just have some unit test quibbles:

* We should test the null URI case as well
* Better to use GenericTestUtils#assertExceptionContains rather than the current logic, and
Assert.fail, i.e.

{code}
try {
  // some op that should fail
  fail("Op should have failed!");
} catch (MyException e) {
  assertExceptionContains("expected exception text");
}
{code}

+1 pending this though, thanks. I'll release note this just in case, but it seems like a straight
bug to me considering we don't allow empty strings in the String constructor.

> The constructor of Path should not take an empty URL as a parameter
> -------------------------------------------------------------------
>
>                 Key: HADOOP-10876
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10876
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: zhihai xu
>         Attachments: HADOOP-10876.000.patch
>
>
> The constructor of Path should not take an empty URL as a parameter, As discussed in
HADOOP-10820, This JIRA is to change Path constructor at public Path(URI aUri) to check the
empty URI and throw IllegalArgumentException for empty URI.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message