harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-4856) [classlib][luni] Extending HashMap causes MapEntry assignment problem
Date Thu, 22 Nov 2007 15:13:43 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Tim Ellison updated HARMONY-4856:

    Environment: Window XP  (was: Window XP, purefusion20070906_01)
        Summary: [classlib][luni] Extending HashMap causes MapEntry assignment problem  (was:
Common-chain test bug)

Attempt to clarify the summary.

A simple test case illustrating the problem would be helpful.

> [classlib][luni] Extending HashMap causes MapEntry assignment problem
> ---------------------------------------------------------------------
>                 Key: HARMONY-4856
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4856
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Window XP
>            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.

View raw message