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

getRepositoryInfo always returns available top repository from the list even if the repository id passed into getRepositoryInfo is set to a different repository

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • OpenCMIS 0.13.0
    • OpenCMIS 0.14.0
    • Windows Server 2012/ RHEL, tomcat/ WAS. Open CMIS 0.13.0 / Tip build, IBM FileNet repository

    Description

      The issues is in "Apache Chemistry client code" within the jar file "chemistry-opencmis-client-bindings-0.13.0".

      • The getRepositoryInfo() on the client side is implemented in the class "RepositoryServiceImpl" (under the package "org.apache.chemistry.opencmis.client.bindings.spi.browser"). JAR file "chemistry-opencmis-client-bindings-0.13.0".
      • This method has a snippet which does something unexpected. When the length of the repository infos list is 1, it returns that SOLE repository.

      Code Snippet below:

      public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
      List repositoryInfos = getRepositoriesInternal(repositoryId);

      if (repositoryInfos.isEmpty())

      { throw new CmisObjectNotFoundException("Repository '" + repositoryId + "'not found!"); }

      if (repositoryInfos.size() == 1)

      { return (RepositoryInfo)repositoryInfos.get(0); }

      for (RepositoryInfo info : repositoryInfos) {
      if (info.getId() == null)

      { continue; }

      if (info.getId().equals(repositoryId))

      { return info; }

      }

      throw new CmisObjectNotFoundException("Repository '" + repositoryId + "'not found!");
      }

      • So, when the number of repositories in the given domain is just one, it always returns that irrespective what the user has set in the property "org.apache.chemistry.opencmis.session.repository.id"

      Proposed solution:
      The "if " condition above checking for repositoryInfos.size, which returns the only available repository should be removed.

      Attachments

        Activity

          People

            fmui Florian Müller
            srinivas.gannavarapu Srinivas Gannavarapu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified