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

            People

            • Assignee:
              macbean Andrew MacBean
              Reporter:
              rgodfrey Robert Godfrey

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment