You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Keith Wall (JIRA)" <ji...@apache.org> on 2015/05/31 23:52:18 UTC

[jira] [Commented] (QPID-6412) Declare variables as ConcurrentMap not ConcurrentHashMap to avoid issues after compiling on Java 8

    [ https://issues.apache.org/jira/browse/QPID-6412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14566768#comment-14566768 ] 

Keith Wall commented on QPID-6412:
----------------------------------

Alex, can you review this commit please?

> Declare variables as ConcurrentMap not ConcurrentHashMap to avoid issues after compiling on Java 8
> --------------------------------------------------------------------------------------------------
>
>                 Key: QPID-6412
>                 URL: https://issues.apache.org/jira/browse/QPID-6412
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker, Java Client, Java Common
>    Affects Versions: 0.32
>            Reporter: Keith Wall
>            Assignee: Alex Rudyy
>             Fix For: 6.0 [Java]
>
>
> Java 8 redefines the method keySet() on ConcurrentHashMap to return a narrower type than the standard return type given in the Map interface.  If the code is compiled in Java 8 and then run under Java 7 this causes linking issues.
> Avoid these issues by always declaring variables in terms of the interface ConcurrentMap



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org