hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HADOOP-501) toString(resources, sb) in Configuration.java throws a ClassCastException since resources can be loaded from an URL
Date Tue, 05 Sep 2006 19:11:24 GMT
     [ http://issues.apache.org/jira/browse/HADOOP-501?page=all ]

Doug Cutting resolved HADOOP-501.
---------------------------------

    Fix Version/s: 0.6.0
       Resolution: Fixed

> toString(resources, sb) in Configuration.java throws a ClassCastException since resources
can be loaded from an URL
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-501
>                 URL: http://issues.apache.org/jira/browse/HADOOP-501
>             Project: Hadoop
>          Issue Type: Bug
>    Affects Versions: 0.5.0
>            Reporter: Thomas FRIOL
>            Priority: Minor
>             Fix For: 0.6.0
>
>         Attachments: Configuration.java.patch
>
>
> Object obj = i.next();
> if (obj instanceof Path) {
>         sb.append((Path)obj);
> } else {
>         sb.append((String)obj);
> }
> If obj is an URL -> ClassCastException.
> Moreover, I think the test before appending the resource to the StringBuffer is not really
necessary since the method take an Object as argument. Why not simply have :
> Object obj = i.next();
> sb.append(obj);
> I have attached a patch to fix this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message