Uploaded image for project: 'Chemistry (Retired)'
  1. Chemistry (Retired)
  2. CMIS-432

AbstractCmisService is not thread safe

    XMLWordPrintableJSON

Details

    Description

      The use of an unsynchronized HashMap for storing AbstractCmisService.objectInfoMap (see AbstractCmisService.getObjectInfoMap) makes it inherently thread unsafe. When extending that class, we ran in busy waits on HashMap.get, which we fixed overriding the following two methods to which we added the syncronized bit:

          @Override
          public synchronized ObjectInfo getObjectInfo(String repositoryId, String objectId) {
              return super.getObjectInfo(repositoryId, objectId);
          }
      
          @Override
          public synchronized void addObjectInfo(ObjectInfo objectInfo) {
              super.addObjectInfo(objectInfo);
          }
      

      It would still be nice if thread safety is provided by the library itself without the need for external synchronization.

      Attachments

        Activity

          People

            Unassigned Unassigned
            skuro Carlo Sciolla
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: