array type casting is not allowed

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 1.0
    • Affects Version/s: 1.0
    • Component/s: tools
    • 1.0alpha3
    • sparc
    • solaris_2.4
    • Not verified

      ( Copied from remedy bug 282 as submitted by avh)

      This is not allowed:

      Object object_array[] = ...;
      String string_array[] = (String [])object_array;

      The reason why I want this is that I tried adding a toArray() method to
      the Vector class which returns an array of objects. The method is
      pretty useless because I can't cast the result to an array of a
      different (more narrow) type.

            Assignee:
            Arthur Hoff (Inactive)
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: