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
         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

        

Reply via email to