Changeset 1997


Ignore:
Timestamp:
01/03/07 10:35:17 (13 years ago)
Author:
chris
Message:

PrairieReader:
1) added code at line 214 to preclude the substring method
being called with -1, because it's messing up my stuff.
Hopefully this will work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/PrairieReader.java

    r1996 r1997  
    212212      while (s.length() > 0) { 
    213213        int ndx = s.indexOf("<"); 
    214         String sub = s.substring(ndx + 1, s.indexOf(">", ndx)); 
    215         s = s.substring(s.indexOf(">", ndx) + 1); 
    216         elements.add(sub); 
     214        if(ndx != -1) { 
     215          String sub = s.substring(ndx + 1, s.indexOf(">", ndx)); 
     216          s = s.substring(s.indexOf(">", ndx) + 1); 
     217          elements.add(sub); 
     218        } 
    217219      } 
    218220 
Note: See TracChangeset for help on using the changeset viewer.