You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Ross Clewley (JIRA)" <de...@myfaces.apache.org> on 2014/05/20 19:04:39 UTC
[jira] [Commented] (PORTLETBRIDGE-234) remove(String) in
BridgeRequestScopeRepository and remove(Object) in HashMap have the same
erasure.
[ https://issues.apache.org/jira/browse/PORTLETBRIDGE-234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14003635#comment-14003635 ]
Ross Clewley commented on PORTLETBRIDGE-234:
--------------------------------------------
The signature of the remove method in BridgeRequestScopeRepository is
public BridgeRequestScope remove(String key)
Confusingly, BridgeRequestScope is not a class name in this context but a generics type parameter name (this is somewhat misleading and probably ought to be cleaned up):
public class BridgeRequestScopeRepository<String, BridgeRequestScope extends ConcurrentMap<String, Object>>
extends LinkedHashMap<String, BridgeRequestScope>
Therefore BridgeRequestScope will be erased at runtime, leading to the conflict with the superclass method from HashMap which is declared as:
public V remove(Object key) { }.
> remove(String) in BridgeRequestScopeRepository and remove(Object) in HashMap have the same erasure.
> ---------------------------------------------------------------------------------------------------
>
> Key: PORTLETBRIDGE-234
> URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-234
> Project: MyFaces Portlet Bridge
> Issue Type: Bug
> Components: Impl
> Affects Versions: 3.0.0
> Reporter: Ross Clewley
> Assignee: Michael Freedman
>
> Compiling the portlet bridge impl project on trunk produces the following compilation error.
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.1:compile (default-compile) on project portlet-bridge-impl: Compilation failure
> [ERROR] /myfaces-trunk/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/scope/BridgeRequestScopeRepository.java:[55,28] error: name clash: remove(String) in BridgeRequestScopeRepository and remove(Object) in HashMap have the same erasure, yet neither overrides the other
--
This message was sent by Atlassian JIRA
(v6.2#6252)