[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Fri Jul 27 21:45:13 UTC 2007


gordonp
Fri Jul 27 17:45:13 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data
In directory dev.open-bio.org:/tmp/cvs-serv26330/src/main/org/biomoby/shared/data

Modified Files:
	MobyDataObjectSet.java 
Log Message:
Fixed neaest-common-acestor determination algorithm when one object is shallow
moby-live/Java/src/main/org/biomoby/shared/data MobyDataObjectSet.java,1.8,1.9
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObjectSet.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObjectSet.java	2007/06/07 23:58:15	1.8
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObjectSet.java	2007/07/27 21:45:13	1.9
@@ -109,10 +109,11 @@
 		    }
 		    else{
 			for(int i = 0; i < lineage.length; i++){
-			    if(!lineage[i].equals(objLineage[i])){
+			    if(i >= objLineage.length || !lineage[i].equals(objLineage[i])){
 				// start of different family tree, truncate common lineage here
 				lineage = new MobyDataType[i];
 				System.arraycopy(objLineage, 0, lineage, 0, i);
+				break;  //would happen anyway due to lineage resize, but let's make it explicit
 			    }
 			}
 		    }




More information about the MOBY-guts mailing list