harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen Shunfei (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4856) Common-chain test bug
Date Wed, 26 Sep 2007 09:11:50 GMT
Common-chain test bug
---------------------

                 Key: HARMONY-4856
                 URL: https://issues.apache.org/jira/browse/HARMONY-4856
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Window XP, purefusion20070906_01
            Reporter: Chen Shunfei
            Priority: Minor


MapEntryImpl is incompatiable with HashMap.MapEntry
We have a interface Map.Entry and Class MapEntry implements Map.Entry and a inner class of
HashMap called Entry extends MapEntry. Here comes the problem: a class in common-chain called
ContextBase extends HashMap and one of its inner classes MapEntryImpl implement Map.Entry.
When ContextBase call a method writeObject in HashMap which has such a clause Entry<?,
?> entry = (Entry<?, ?>) iterator.next(), stream goes back to ContextBase and returns
like this 
Map.Entry entry= ContextBase.this.entry(keys.next())(this one is a MapEntryImpl). 
In these clause Entry<?, ?> entry = (Entry<?, ?>) iterator.next(), it returns
a MapEntryImpl  which can not be assigned to Entry<?,?>. Since:
HashMap.Entry extends MapEntry, MapEntry implements Map.Entry


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message