Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-1200648

array type casting is not allowed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.0
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.0alpha3
    • CPU:
      sparc
    • OS:
      solaris_2.4
    • Verification:
      Not verified

      Description

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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: