Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-6017

[classlib] [luni] (Iterator) Hashtable.keys() throws ClassCastException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0M7
    • 5.0M9
    • Classlib
    • None
    • Moderate

    Description

      Given a test case [1], HARMONY will throws ClassCastException while RI works well. This also occurs when cast Hashtable.elements() to Iterator and cast Hashtable.keySet().iterator() to Enumeration.

      [1]
      public void test_HashTable_keys() {
      Hashtable hashTable = new Hashtable();
      hashTable.put("key", "value");

      // cast Enumeration to Iterator
      Iterator iterator = (Iterator) hashTable.keys();
      }

      Attachments

        1. HARMONY-6017.diff
          14 kB
          Kevin Zhou

        Activity

          People

            tellison Tim Ellison
            zhoukevin Kevin Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified