if ( !lineage.get( i ).equalsIgnoreCase( up_taxonomy.getLineage().get( i ) ) ) {
authorcmzmasek <cmzmasek@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Sun, 30 Dec 2012 05:27:19 +0000 (05:27 +0000)
committercmzmasek <cmzmasek@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Sun, 30 Dec 2012 05:27:19 +0000 (05:27 +0000)
becomes:

if ( i == up_taxonomy.getLineage().size() || !lineage.get( i ).equalsIgnoreCase( up_taxonomy.getLineage().get( i ) ) ) {

forester/java/src/org/forester/analysis/TaxonomyDataManager.java

index 48b434c..302a93c 100644 (file)
@@ -337,7 +337,7 @@ public final class TaxonomyDataManager extends RunnableProcess {
                 for( final UniProtTaxonomy up_taxonomy : up_taxonomies ) {
                     boolean match = true;
                     I: for( int i = 0; i < lineage.size(); ++i ) {
-                        if ( !lineage.get( i ).equalsIgnoreCase( up_taxonomy.getLineage().get( i ) ) ) {
+                        if ( i == up_taxonomy.getLineage().size() || !lineage.get( i ).equalsIgnoreCase( up_taxonomy.getLineage().get( i ) ) ) {
                             match = false;
                             break I;
                         }