You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2009/01/03 17:33:52 UTC

svn commit: r731018 - /lenya/trunk/src/java/org/apache/lenya/cms/workflow/DocumentWorkflowable.java

Author: andreas
Date: Sat Jan  3 08:33:52 2009
New Revision: 731018

URL: http://svn.apache.org/viewvc?rev=731018&view=rev
Log:
Adding assertion that identity of workflowable must not be null.

Modified:
    lenya/trunk/src/java/org/apache/lenya/cms/workflow/DocumentWorkflowable.java

Modified: lenya/trunk/src/java/org/apache/lenya/cms/workflow/DocumentWorkflowable.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/workflow/DocumentWorkflowable.java?rev=731018&r1=731017&r2=731018&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/workflow/DocumentWorkflowable.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/workflow/DocumentWorkflowable.java Sat Jan  3 08:33:52 2009
@@ -39,6 +39,7 @@
 import org.apache.lenya.cms.publication.Document;
 import org.apache.lenya.cms.publication.ResourceType;
 import org.apache.lenya.cms.repository.Session;
+import org.apache.lenya.util.Assert;
 import org.apache.lenya.workflow.Version;
 import org.apache.lenya.workflow.Workflow;
 import org.apache.lenya.workflow.Workflowable;
@@ -59,6 +60,9 @@
      */
     public DocumentWorkflowable(ServiceManager manager, Session session, Document document,
             Logger logger) {
+        if (session.getIdentity() == null) {
+            throw new IllegalArgumentException("The session must have an identity.");
+        }
         this.document = document;
         this.session = session;
         this.manager = manager;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org