luetzkendorf    2004/10/08 09:36:10

  Modified:    src/webdav/server/org/apache/slide/webdav/util/resourcekind
                        AbstractResourceKind.java
               src/stores/org/apache/slide/store/impl/rdbms
                        DB2RDBMSAdapter.java
               src/webdav/server/org/apache/slide/webdav/util
                        VersioningHelper.java
  Log:
  patch for bug 31492 by Warwick Burrows (merge)
  
  Revision  Changes    Path
  1.31      +5 -5      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/resourcekind/AbstractResourceKind.java
  
  Index: AbstractResourceKind.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/resourcekind/AbstractResourceKind.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- AbstractResourceKind.java 5 Aug 2004 14:43:33 -0000       1.30
  +++ AbstractResourceKind.java 8 Oct 2004 16:36:09 -0000       1.31
  @@ -85,7 +85,7 @@
        * e.g. <code>discouraged</code>.
        */
       protected final static String[] SUPPORTED_CHECKOUT_FORK_ELEMENTS =
  -        new String[] {E_DISCOURAGED, E_FORBIDDEN};
  +        new String[] {EMPTY_STRING, E_DISCOURAGED, E_FORBIDDEN};
       
       /**
        * A String array containing the names of the Elements supported as a
  @@ -93,7 +93,7 @@
        * e.g. <code>discouraged</code>.
        */
       protected final static String[] SUPPORTED_CHECKIN_FORK_ELEMENTS =
  -        new String[] {E_DISCOURAGED, E_FORBIDDEN};
  +        new String[] {EMPTY_STRING, E_DISCOURAGED, E_FORBIDDEN};
       
       /**
        * The values of [EMAIL PROTECTED] #SUPPORTED_AUTO_VERSION_ELEMENTS 
SUPPORTED_AUTO_VERSION_ELEMENTS}
  
  
  
  1.6       +18 -12    
jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/DB2RDBMSAdapter.java
  
  Index: DB2RDBMSAdapter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/DB2RDBMSAdapter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DB2RDBMSAdapter.java      8 Oct 2004 14:49:56 -0000       1.5
  +++ DB2RDBMSAdapter.java      8 Oct 2004 16:36:09 -0000       1.6
  @@ -103,14 +103,20 @@
               while (bindings.hasMoreElements()) {
                   ObjectNode.Binding binding = (ObjectNode.Binding) 
bindings.nextElement();
                   try {
  -                                     long childID = 
getID(connection,binding.getUuri());
  -                    statement =
  -                        connection.prepareStatement(
  -                            "insert into BINDING (URI_ID, NAME, CHILD_UURI_ID) 
values (?,?,?)");
  -                    statement.setLong(1, uriid);
  -                    statement.setString(2, binding.getName());
  -                    statement.setLong(3, childID);
  -                    statement.executeUpdate();
  +                                          long childID = 
getID(connection,binding.getUuri());
  +                    /* 
  +                     * ChildID can be 0 if we are the root "/" and the child is a 
mount point for
  +                     * another store since it won't be listed in the tables of the 
root store. 
  +                     */ 
  +                    if (childID != 0) {
  +                        statement =
  +                            connection.prepareStatement(
  +                                "insert into BINDING (URI_ID, NAME, CHILD_UURI_ID) 
values (?,?,?)");
  +                        statement.setLong(1, uriid);
  +                        statement.setString(2, binding.getName());
  +                        statement.setLong(3, childID);
  +                        statement.executeUpdate();
  +                    }
                   } finally {
                       close(statement);
                   }
  
  
  
  1.110     +9 -6      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java
  
  Index: VersioningHelper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java,v
  retrieving revision 1.109
  retrieving revision 1.110
  diff -u -r1.109 -r1.110
  --- VersioningHelper.java     26 Sep 2004 14:52:32 -0000      1.109
  +++ VersioningHelper.java     8 Oct 2004 16:36:09 -0000       1.110
  @@ -949,7 +949,9 @@
           ViolatedPrecondition violatedPrecondition = null;
           
           NodeProperty checkoutForkProperty =cinNrd.getProperty(P_CHECKOUT_FORK);
  -        if (checkoutForkProperty != null) {
  +        if (checkoutForkProperty != null
  +             && !checkoutForkProperty.getValue().toString().equals("")) 
  +        {
               Element checkoutForkElement = 
pHelp.parsePropertyValue(checkoutForkProperty.getValue().toString());
               if (checkoutForkElement != null) {
                   
  @@ -1358,8 +1360,9 @@
                                                                                
vhrNrds,
                                                                                
predecessorNrn);
                       NodeProperty predecessorCheckinForkProperty = 
predecessorNrd.getProperty(P_CHECKIN_FORK);
  -                    if (predecessorCheckinForkProperty != null) {
  -                        
  +                    if (predecessorCheckinForkProperty != null
  +                            && 
!predecessorCheckinForkProperty.getValue().toString().equals("")) 
  +                    {
                           Enumeration predecessorSuccessors = 
vhrNrds.getSuccessors(predecessorNrn);
                           if ( (predecessorSuccessors != null) &&
                                   (predecessorSuccessors.hasMoreElements()) &&
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to