OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

cmis message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (CMIS-789) getRepositoryInfo always returns available top repository from the list even if the repository id passed into getRepositoryInfo is set to a different repository


    [ https://issues.oasis-open.org/browse/CMIS-789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61130#comment-61130 ] 

Florian Mueller commented on CMIS-789:
--------------------------------------

This is the wrong bug tracker.
You are looking for this one: https://issues.apache.org/jira/browse/CMIS

> getRepositoryInfo always returns available top repository from the list even if the repository id passed into getRepositoryInfo is set to a different repository
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CMIS-789
>                 URL: https://issues.oasis-open.org/browse/CMIS-789
>             Project: OASIS Content Management Interoperability Services (CMIS) TC
>          Issue Type: Bug
>          Components: Browser Binding, REST/AtomPub Binding
>    Affects Versions: V1.1 Errata
>         Environment: Windows Server 2012/ RHEL,  tomcat/ WAS. Open CMIS 0.13.0 / Tip build, IBM FileNet repository
>            Reporter: Srinivas Gannavarapu
>            Priority: Critical
>             Fix For: V1.1 Errata
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]