luetzkendorf 2005/01/19 07:21:53 Modified: src/webdav/server/org/apache/slide/webdav/util VersioningHelper.java Log: NodeRevisionDescriptor.getSuccessors now will never return null Revision Changes Path 1.117 +8 -10 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.116 retrieving revision 1.117 diff -u -r1.116 -r1.117 --- VersioningHelper.java 10 Jan 2005 18:13:25 -0000 1.116 +++ VersioningHelper.java 19 Jan 2005 15:21:52 -0000 1.117 @@ -955,7 +955,7 @@ // check if the version has successors Enumeration successors = cinNrds.getSuccessors(cinNrd.getRevisionNumber()); - if ( (successors != null) && successors.hasMoreElements()) { + if ( successors.hasMoreElements()) { // check precondition C_CHECKOUT_OF_VERSION_WITH_DESCENDANT_IS_FORBIDDEN if (E_FORBIDDEN.equals(checkoutForkElement.getName())) { @@ -1363,9 +1363,8 @@ && !predecessorCheckinForkProperty.getValue().toString().equals("")) { Enumeration predecessorSuccessors = vhrNrds.getSuccessors(predecessorNrn); - if ( (predecessorSuccessors != null) && - (predecessorSuccessors.hasMoreElements()) && - (predecessorCheckinForkProperty.getValue() != null) ) { + if ( (predecessorSuccessors.hasMoreElements()) && + (predecessorCheckinForkProperty.getValue() != null) ) { String checkinFork = getElementName(predecessorCheckinForkProperty.getValue().toString()); @@ -1438,8 +1437,7 @@ if (predecessorCheckinForkProperty != null) { Enumeration predecessorSuccessors = vhrNrds.getSuccessors(predecessorNrn); - if ( (predecessorSuccessors != null) && - predecessorSuccessors.hasMoreElements() ) { + if ( predecessorSuccessors.hasMoreElements() ) { forkBranch = "branch_" + predecessorNrn.toString(); } } @@ -1711,10 +1709,10 @@ String autoVersionValue = getAutoVersionElementName(revisionDescriptor); return ( (autoVersionValue != null) && ( DeltavConstants.E_CHECKOUT_CHECKIN.equals(autoVersionValue) || - DeltavConstants.E_CHECKOUT_UNLOCKED_CHECKIN.equals(autoVersionValue) || - DeltavConstants.E_CHECKOUT.equals(autoVersionValue) || - DeltavConstants.E_CHECKOUT_IGNORE_UNLOCK.equals(autoVersionValue) || - DeltavConstants.E_LOCKED_CHECKOUT.equals(autoVersionValue) ) ); + DeltavConstants.E_CHECKOUT_UNLOCKED_CHECKIN.equals(autoVersionValue) || + DeltavConstants.E_CHECKOUT.equals(autoVersionValue) || + DeltavConstants.E_CHECKOUT_IGNORE_UNLOCK.equals(autoVersionValue) || + DeltavConstants.E_LOCKED_CHECKOUT.equals(autoVersionValue) ) ); } /**
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]