You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by re...@apache.org on 2001/07/12 07:12:23 UTC

cvs commit: jakarta-slide/src/share/org/apache/slide/common Namespace.java

remm        01/07/11 22:12:22

  Modified:    src/share/org/apache/slide/common Namespace.java
  Log:
  - Ignore ObjectAlreadyExistException which can occur on the root node, so that the
    structure of the namespace is always refreshed.
  
  Revision  Changes    Path
  1.33      +8 -5      jakarta-slide/src/share/org/apache/slide/common/Namespace.java
  
  Index: Namespace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/Namespace.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- Namespace.java	2001/06/20 18:16:57	1.32
  +++ Namespace.java	2001/07/12 05:12:19	1.33
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/Namespace.java,v 1.32 2001/06/20 18:16:57 remm Exp $
  - * $Revision: 1.32 $
  - * $Date: 2001/06/20 18:16:57 $
  + * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/Namespace.java,v 1.33 2001/07/12 05:12:19 remm Exp $
  + * $Revision: 1.33 $
  + * $Date: 2001/07/12 05:12:19 $
    *
    * ====================================================================
    *
  @@ -93,7 +93,7 @@
    * Namespace class.
    *
    * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
  - * @version $Revision: 1.32 $
  + * @version $Revision: 1.33 $
    */
   public final class Namespace {
       
  @@ -677,7 +677,10 @@
               Uri rootUri = getUri("/");
               SubjectNode rootNode = new SubjectNode("/");
               NodePermission allAccess = new NodePermission("/", "/", "/");
  -            rootUri.getStore().createObject(rootUri, rootNode);
  +            try {
  +                rootUri.getStore().createObject(rootUri, rootNode);
  +            } catch (ObjectAlreadyExistsException e) {
  +            }
               rootUri.getStore().grantPermission(rootUri, allAccess);
               
               // Create a dummy action