chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1412228 - /chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/MovePanel.java
Date Wed, 21 Nov 2012 18:47:34 GMT
Author: fmui
Date: Wed Nov 21 18:47:33 2012
New Revision: 1412228

URL: http://svn.apache.org/viewvc?rev=1412228&view=rev
Log:
Workbench: avoid exception if move changes the object id

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/MovePanel.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/MovePanel.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/MovePanel.java?rev=1412228&r1=1412227&r2=1412228&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/MovePanel.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/MovePanel.java
Wed Nov 21 18:47:33 2012
@@ -72,7 +72,8 @@ public class MovePanel extends ActionPan
     @Override
     public boolean doAction() throws Exception {
         ObjectId targetFolderId = new ObjectIdImpl(targetFolderField.getText());
-        ((FileableCmisObject) getObject()).move(getClientModel().getCurrentFolder(), targetFolderId);
-        return true;
+        FileableCmisObject before = (FileableCmisObject) getObject();
+        FileableCmisObject after = before.move(getClientModel().getCurrentFolder(), targetFolderId);
+        return before.getId().equals(after.getId());
     }
 }



Mime
View raw message