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 2006/11/14 19:22:55 UTC

svn commit: r474904 - /lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNode.java

Author: andreas
Date: Tue Nov 14 10:22:55 2006
New Revision: 474904

URL: http://svn.apache.org/viewvc?view=rev&rev=474904
Log:
Don't fail if no rc entries are present (SourceNode)

Modified:
    lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNode.java

Modified: lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNode.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNode.java?view=diff&rev=474904&r1=474903&r2=474904
==============================================================================
--- lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNode.java (original)
+++ lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNode.java Tue Nov 14 10:22:55 2006
@@ -190,11 +190,13 @@
      */
     public boolean isCheckedOutByUser() throws RepositoryException {
         try {
-            RCMLEntry entry = getRcml().getLatestEntry();
-            if (entry.getIdentity().equals(getUserId()) && isCheckedOut())
-                return true;
-            else
-                return false;
+            if (getRcml().getEntries().size() > 0) {
+                RCMLEntry entry = getRcml().getLatestEntry();
+                if (entry.getIdentity().equals(getUserId()) && isCheckedOut()) {
+                    return true;
+                }
+            }
+            return false;
         } catch (Exception e) {
             throw new RepositoryException(e);
         }



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