Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-501

toString(resources, sb) in Configuration.java throws a ClassCastException since resources can be loaded from an URL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.5.0
    • 0.6.0
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            titom Thomas Friol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: