You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2006/09/05 21:11:24 UTC

[jira] Resolved: (HADOOP-501) toString(resources, sb) in Configuration.java throws a ClassCastException since resources can be loaded from an URL

     [ 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