chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r912550 - in /incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src: main/java/org/apache/opencmis/inmemory/ main/java/org/apache/opencmis/inmemory/storedobj/api/ main/java/org/apache/opencmis/inmemory/storedobj/im...
Date Mon, 22 Feb 2010 12:49:44 GMT
Author: jens
Date: Mon Feb 22 12:49:43 2010
New Revision: 912550

URL: http://svn.apache.org/viewvc?rev=912550&view=rev
Log:
Fix all issues that FindBugs reports

Modified:
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/CmisInMemoryProvider.java
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/DataObjectCreator.java
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/api/Version.java
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/FolderImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/ObjectStoreImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/VersionedDocumentImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/AbstractServiceTst.java
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/NavigationServiceTest.java
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/ObjectServiceTest.java
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/RepositoryServiceTest.java
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/VersioningTest.java

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/CmisInMemoryProvider.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/CmisInMemoryProvider.java?rev=912550&r1=912549&r2=912550&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/CmisInMemoryProvider.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/CmisInMemoryProvider.java
Mon Feb 22 12:49:43 2010
@@ -109,7 +109,7 @@
       fStoreManager.createAndInitRepository(repositoryId, typeCreatorClassName);
     } else {    
       // then init repository (note: loads root folder which requires cmis:folder type available)
-      fStoreManager.initRepository(repositoryId);
+      fStoreManager.initRepository(null);
     }
     
 //    String repoInfoCreatorClassName = (String) fSession.get(ConfigConstants.REPOSITORY_INFO_CREATOR_CLASS);

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/DataObjectCreator.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/DataObjectCreator.java?rev=912550&r1=912549&r2=912550&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/DataObjectCreator.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/DataObjectCreator.java
Mon Feb 22 12:49:43 2010
@@ -65,7 +65,7 @@
       canCheckIn = isCheckedOut && ((Version)so).getParentDocument().getCheckedOutBy().equals(user);
     } else if (so instanceof VersionedDocument) {
       isCheckedOut = ((VersionedDocument)so).isCheckedOut();
-      canCheckOut = (so instanceof VersionedDocument) && !((VersionedDocument)so).isCheckedOut();
+      canCheckOut = !((VersionedDocument)so).isCheckedOut();
       canCheckIn = isCheckedOut && ((VersionedDocument)so).getCheckedOutBy().equals(user);
     }
           

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/api/Version.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/api/Version.java?rev=912550&r1=912549&r2=912550&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/api/Version.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/api/Version.java
Mon Feb 22 12:49:43 2010
@@ -35,6 +35,8 @@
    */
   void commit(boolean isMajor);
 
+  void setCheckinComment(String comment);
+  
   String getCheckinComment();
   
   String getVersionLabel();

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java?rev=912550&r1=912549&r2=912550&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java
Mon Feb 22 12:49:43 2010
@@ -38,8 +38,8 @@
       fContent = contentStream.toByteArray();
       fLength = contentStream.size();
       contentStream.close();
+      in.close();    
     }
-    in.close();    
   }
 
   public BigInteger getLength() {

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java?rev=912550&r1=912549&r2=912550&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
Mon Feb 22 12:49:43 2010
@@ -76,6 +76,10 @@
     }  
   }
   
+  public void setCheckinComment(String comment) {
+    fComment = comment;
+  }
+
   public String getCheckinComment() {
     return fComment;
   }

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/FolderImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/FolderImpl.java?rev=912550&r1=912549&r2=912550&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/FolderImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/FolderImpl.java
Mon Feb 22 12:49:43 2010
@@ -69,11 +69,6 @@
       throw new RuntimeException("Cannot create document " + name
           + ". Name already exists in parent folder");
 
-    String documentPath = getPath();
-    if (documentPath.equals(PATH_SEPARATOR))
-      documentPath += name;
-    else
-      documentPath += PATH_SEPARATOR + name;
     ((Path)so).setParent(this);
     so.persist();
   }

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/ObjectStoreImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/ObjectStoreImpl.java?rev=912550&r1=912549&r2=912550&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/ObjectStoreImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/ObjectStoreImpl.java
Mon Feb 22 12:49:43 2010
@@ -252,8 +252,10 @@
   
   private void deleteFolder(String folderId) {
     StoredObject folder = fStoredObjectMap.get(folderId);
-    if (folder != null) {
-      if (!(folder instanceof FolderImpl))
+    if (folder == null)
+      throw new RuntimeException("Unknown object with id:  " + folderId);
+
+    if (!(folder instanceof FolderImpl)) {
         throw new RuntimeException("Cannot delete folder with id:  " + folderId
             + ". Object exists but is not a folder.");
     }

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/VersionedDocumentImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/VersionedDocumentImpl.java?rev=912550&r1=912549&r2=912550&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/VersionedDocumentImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/storedobj/impl/VersionedDocumentImpl.java
Mon Feb 22 12:49:43 2010
@@ -84,7 +84,7 @@
 
   public void checkIn(boolean isMajor, String checkinComment, String user) {
     if (fIsCheckedOut) {
-      if (fCheckedOutUser.equals(user)) {
+      if (fCheckedOutUser.equals(user)) {        
         fIsCheckedOut = false;
         fCheckedOutUser = null;
       } else {
@@ -96,6 +96,7 @@
       throw new CmisConstraintException("Error: Can't cancel checkout, Document " + getId()
+ " is not checked out.");
     
     DocumentVersion pwc = getPwc();
+    pwc.setCheckinComment(checkinComment);
     pwc.commit(isMajor);
   }
 

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/AbstractServiceTst.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/AbstractServiceTst.java?rev=912550&r1=912549&r2=912550&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/AbstractServiceTst.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/AbstractServiceTst.java
Mon Feb 22 12:49:43 2010
@@ -47,6 +47,7 @@
   protected NavigationService fNavSvc;
   protected RepositoryService fRepSvc;
   protected VersioningService fVerSvc;
+  private String fTypeCreatorClassName;
   private boolean fUseClientProviderInterface;
   
   public AbstractServiceTst() {
@@ -56,16 +57,24 @@
     // The default is using the direct implementation. Subclasses may override
     // this behavior
     fUseClientProviderInterface = false;
+      // Init with default types, can be overridden by subclasses:
+    fTypeCreatorClassName = UnitTestTypeSystemCreator.class.getName();
   }
   
-  protected void setUp(String typeCreatorClassName) throws Exception {
-    LOG.debug("Initializing InMemory Test with type creator class: " + typeCreatorClassName);
+  // Subclasses may want to use their own types
+  protected void setTypeCreatorClass(String typeCreatorClassName) {
+    fTypeCreatorClassName = typeCreatorClassName;
+  }
+  
+  protected void setUp() throws Exception {
+    super.setUp();
+    LOG.debug("Initializing InMemory Test with type creator class: " + fTypeCreatorClassName);
     Map<String, String> parameters = new HashMap<String, String>();
     parameters.put(SessionParameter.BINDING_SPI_CLASS, CmisProviderFactory.BINDING_SPI_INMEMORY);
     // attach TypeSystem to the session
 
     // attach repository info to the session:
-    parameters.put(ConfigConstants.TYPE_CREATOR_CLASS, typeCreatorClassName);
+    parameters.put(ConfigConstants.TYPE_CREATOR_CLASS, fTypeCreatorClassName);
     parameters.put(ConfigConstants.REPOSITORY_ID, REPOSITORY_ID);
 
     // attach repository info to the session:
@@ -100,11 +109,8 @@
   protected void addParameters(Map<String, String> parameters) {    
   }
 
-  protected void setUp() throws Exception {
-    setUp(UnitTestTypeSystemCreator.class.getName());
-  }
-  
   protected void tearDown() throws Exception {
+    super.tearDown();
   }
   
   public void testDummy() {

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/NavigationServiceTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/NavigationServiceTest.java?rev=912550&r1=912549&r2=912550&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/NavigationServiceTest.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/NavigationServiceTest.java
Mon Feb 22 12:49:43 2010
@@ -188,8 +188,9 @@
   }
 
   private int getSizeOfDescendants(List<ObjectInFolderContainer> objs) {
-    int sum = objs.size();
+    int sum = 0; 
     if (null != objs) {
+      sum = objs.size();
       for (ObjectInFolderContainer obj: objs) {
         if (null != obj.getChildren())
           sum += getSizeOfDescendants(obj.getChildren());

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/ObjectServiceTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/ObjectServiceTest.java?rev=912550&r1=912549&r2=912550&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/ObjectServiceTest.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/ObjectServiceTest.java
Mon Feb 22 12:49:43 2010
@@ -81,7 +81,8 @@
   ObjectCreator fCreator;
   
   protected void setUp() throws Exception {
-    super.setUp(ObjectTestTypeSystemCreator.class.getName());
+    super.setTypeCreatorClass(ObjectTestTypeSystemCreator.class.getName());
+    super.setUp();
     fCreator = new ObjectCreator(fFactory, fObjSvc, fRepositoryId);
   }
 

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/RepositoryServiceTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/RepositoryServiceTest.java?rev=912550&r1=912549&r2=912550&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/RepositoryServiceTest.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/RepositoryServiceTest.java
Mon Feb 22 12:49:43 2010
@@ -109,7 +109,8 @@
   
 
   protected void setUp() throws Exception {
-    super.setUp(RepositoryTestTypeSystemCreator.class.getName());
+    super.setTypeCreatorClass(RepositoryTestTypeSystemCreator.class.getName());
+    super.setUp();
   }
 
   protected void tearDown() throws Exception {

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/VersioningTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/VersioningTest.java?rev=912550&r1=912549&r2=912550&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/VersioningTest.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/VersioningTest.java
Mon Feb 22 12:49:43 2010
@@ -67,7 +67,8 @@
   
   @Before
   protected void setUp() throws Exception {
-    super.setUp(VersionTestTypeSystemCreator.class.getName());
+    super.setTypeCreatorClass(VersionTestTypeSystemCreator.class.getName());
+    super.setUp();
     fCreator = new ObjectCreator(fFactory, fObjSvc, fRepositoryId);
     setRuntimeContext(TEST_USER);
   }
@@ -118,7 +119,7 @@
     // test that object is checked out and that all properties are set correctly
     PropertiesData props = fObjSvc.getProperties(fRepositoryId, pwcId, "*", null);
     String changeToken = (String) props.getProperties().get(PropertyIds.CMIS_CHANGE_TOKEN).getFirstValue();
-    checkVersionProperties(pwcId, VersioningState.CHECKEDOUT, props.getProperties());
+    checkVersionProperties(pwcId, VersioningState.CHECKEDOUT, props.getProperties(), null);
     
     // Test that a second checkout is not possible
     try {
@@ -315,7 +316,7 @@
     PropertiesData latest = fVerSvc.getPropertiesOfLatestVersion(fRepositoryId, docId, true,
"*", null);
     assertNotNull(latest);
     
-    checkVersionProperties(verId, versioningState, latest.getProperties());        
+    checkVersionProperties(verId, versioningState, latest.getProperties(), checkinComment);
       
   }
   
   public void testGetLatestVersion() {
@@ -347,7 +348,7 @@
     versioningState = VersioningState.MAJOR;
     boolean isMajor = true;
     ObjectData objData = fVerSvc.getObjectOfLatestVersion(fRepositoryId, docId, isMajor,
"*", false, IncludeRelationships.NONE, null, false, false, null);
-    checkVersionProperties(verId, versioningState, objData.getProperties().getProperties());
       
+    checkVersionProperties(verId, versioningState, objData.getProperties().getProperties(),
checkinComment);        
     ContentStreamData retrievedContent = fObjSvc.getContentStream(fRepositoryId, objData.getId(),
         null, BigInteger.valueOf(-1) /* offset */, BigInteger.valueOf(-1) /* length */, null);
     assertTrue(fCreator.verifyContent(retrievedContent, fCreator.createAlternateContent()));
   
@@ -356,7 +357,7 @@
     versioningState = VersioningState.MAJOR;
     isMajor = false;
     objData = fVerSvc.getObjectOfLatestVersion(fRepositoryId, docId, isMajor, "*", false,
IncludeRelationships.NONE, null, false, false, null);
-    checkVersionProperties(verId, versioningState, objData.getProperties().getProperties());
       
+    checkVersionProperties(verId, versioningState, objData.getProperties().getProperties(),
checkinComment);        
     retrievedContent = fObjSvc.getContentStream(fRepositoryId, objData.getId(),
         null, BigInteger.valueOf(-1) /* offset */, BigInteger.valueOf(-1) /* length */, null);
     assertTrue(fCreator.verifyContent(retrievedContent, fCreator.createAlternateContent()));
       
@@ -438,7 +439,7 @@
     List<ObjectData> allVersions = fVerSvc.getAllVersions(fRepositoryId, docId, "*",
false, null);
     assertEquals(1, allVersions.size());
     
-    checkVersionProperties(verId, versioningState, allVersions.get(0).getProperties().getProperties());
   
+    checkVersionProperties(verId, versioningState, allVersions.get(0).getProperties().getProperties(),
null);    
   }
   
   private String getVersionSeriesId(String docId, Map<String, PropertyData<?>>
props) {
@@ -462,7 +463,7 @@
  
   }
   
-  private void checkVersionProperties(String docId, VersioningState versioningState, Map<String,
PropertyData<?>> props) {
+  private void checkVersionProperties(String docId, VersioningState versioningState, Map<String,
PropertyData<?>> props, String checkinComment) {
     for (PropertyData<?> pd : props.values()) {
       log.info("return property id: " + pd.getId() + ", value: " + pd.getValues());
     }
@@ -515,7 +516,10 @@
     pds = (PropertyStringData) props.get(PropertyIds.CMIS_CHECKIN_COMMENT);
     assertNotNull(pdb);
     sVal = pds.getFirstValue();
-    assertTrue(null == sVal || sVal.equals(""));
+    if (checkinComment == null)
+      assertTrue(null == sVal);
+    else
+      assertEquals(checkinComment, sVal);
     
   }
 



Mime
View raw message