chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1241877 - /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryVersioningServiceImpl.java
Date Wed, 08 Feb 2012 12:04:58 GMT
Author: jens
Date: Wed Feb  8 12:04:58 2012
New Revision: 1241877

URL: http://svn.apache.org/viewvc?rev=1241877&view=rev
Log:
small fix in versioning service

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryVersioningServiceImpl.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryVersioningServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryVersioningServiceImpl.java?rev=1241877&r1=1241876&r2=1241877&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryVersioningServiceImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryVersioningServiceImpl.java
Wed Feb  8 12:04:58 2012
@@ -156,7 +156,7 @@ public class InMemoryVersioningServiceIm
         if (null == versionSeriesId)
             versionSeriesId = objectId;
         if (null == versionSeriesId)
-            throw new CmisInvalidArgumentException("getAllVersions requires a version series
id, but ist was null.");
+            throw new CmisInvalidArgumentException("getAllVersions requires a version series
id, but it was null.");
         so = validator.getAllVersions(context, repositoryId, objectId, versionSeriesId, extension);
 
         if (null == objectId)
@@ -164,23 +164,22 @@ public class InMemoryVersioningServiceIm
 
         if (!(so instanceof VersionedDocument)) {
             if (!(so instanceof DocumentVersion))
-                throw new CmisInvalidArgumentException("getAllVersions requires a id of a
versioned document.");
+                throw new CmisInvalidArgumentException("getAllVersions requires an id of
a versioned document.");
             so = ((DocumentVersion)so).getParentDocument();
         }
-        ObjectData objData = getObject(context, repositoryId, objectId, filter, includeAllowableActions,
-                IncludeRelationships.NONE,extension, objectInfos);
-        res.add(objData);
+//        ObjectData objData = getObject(context, repositoryId, so.getId(), filter, includeAllowableActions,
+//                IncludeRelationships.NONE,extension, objectInfos);
+//        res.add(objData);
 
         VersionedDocument verDoc = (VersionedDocument) so;
         res = new ArrayList<ObjectData>();
         List<DocumentVersion> versions = verDoc.getAllVersions();
         for (DocumentVersion version : versions) {
-            objData = getObject(context, repositoryId, version.getId(), filter, includeAllowableActions,
+            ObjectData objData = getObject(context, repositoryId, version.getId(), filter,
includeAllowableActions,
                     IncludeRelationships.NONE,extension, objectInfos);
             res.add(objData);
         }
 
-
         // reverse list of versions because spec expects latest version first
         List<ObjectData> temp = new ArrayList<ObjectData>(res.size());
         for (ObjectData ver : res)



Mime
View raw message