luetzkendorf 2004/10/08 09:33:23 Modified: src/webdav/server/org/apache/slide/webdav/util/resourcekind Tag: SLIDE_2_1_RELEASE_BRANCH AbstractResourceKind.java src/stores/org/apache/slide/store/impl/rdbms Tag: SLIDE_2_1_RELEASE_BRANCH DB2RDBMSAdapter.java src/webdav/server/org/apache/slide/webdav/util Tag: SLIDE_2_1_RELEASE_BRANCH VersioningHelper.java Log: patch for bug 31492 by Warwick Burrows Revision Changes Path No revision No revision 1.30.2.1 +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.30.2.1 diff -u -r1.30 -r1.30.2.1 --- AbstractResourceKind.java 5 Aug 2004 14:43:33 -0000 1.30 +++ AbstractResourceKind.java 8 Oct 2004 16:33:22 -0000 1.30.2.1 @@ -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} No revision No revision 1.3.2.3 +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.3.2.2 retrieving revision 1.3.2.3 diff -u -r1.3.2.2 -r1.3.2.3 --- DB2RDBMSAdapter.java 2 Oct 2004 17:55:40 -0000 1.3.2.2 +++ DB2RDBMSAdapter.java 8 Oct 2004 16:33:22 -0000 1.3.2.3 @@ -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); } No revision No revision 1.107.2.3 +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.107.2.2 retrieving revision 1.107.2.3 diff -u -r1.107.2.2 -r1.107.2.3 --- VersioningHelper.java 25 Sep 2004 20:38:43 -0000 1.107.2.2 +++ VersioningHelper.java 8 Oct 2004 16:33:22 -0000 1.107.2.3 @@ -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]