luetzkendorf 2005/01/19 07:14:14 Modified: src/share/org/apache/slide/content NodeRevisionDescriptors.java Log: getSuccessors now will never return null Revision Changes Path 1.19 +7 -6 jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptors.java Index: NodeRevisionDescriptors.java =================================================================== RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptors.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- NodeRevisionDescriptors.java 26 Sep 2004 14:54:54 -0000 1.18 +++ NodeRevisionDescriptors.java 19 Jan 2005 15:14:14 -0000 1.19 @@ -29,6 +29,7 @@ import java.util.Vector; import org.apache.slide.common.ObjectValidationFailedException; +import org.apache.slide.util.EmptyEnumeration; import org.apache.slide.util.Messages; /** @@ -250,7 +251,7 @@ if (result != null) { return ((Vector) result).elements(); } else { - return null; + return EmptyEnumeration.INSTANCE; } } @@ -264,7 +265,7 @@ return true; Enumeration ancSuccs = getSuccessors( ancNrn ); - while( ancSuccs != null && ancSuccs.hasMoreElements() ) { + while( ancSuccs.hasMoreElements() ) { NodeRevisionNumber ancSuccNrn = (NodeRevisionNumber)ancSuccs.nextElement(); if( isAncestorDescendant(ancSuccNrn, descNrn) ) return true;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]