Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-6014

[Java] Declare variables as ConcurrentMap not ConcurrentHashMap to avoid issues afetr compiling on Java 8

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      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

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            macbean Andrew MacBean
            rgodfrey Robert Godfrey
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment