@@ -518,8 +518,8 @@ void loadListFile(String listFileName, String majorType, String minorType,
518518 // All this only, if the separator is set at all
519519 if (unescapedSeparator != null ) {
520520 int firstSepIndex = line .indexOf (unescapedSeparator );
521- if (firstSepIndex > -1 ) {
522- entry = line .substring (0 , firstSepIndex );
521+ if (firstSepIndex > -1 ) {
522+ entry = line .substring (0 , firstSepIndex );
523523 // split the rest of the line real fast
524524 int lastSepIndex = firstSepIndex ;
525525 int nrFeatures = 0 ;
@@ -538,6 +538,12 @@ void loadListFile(String listFileName, String majorType, String minorType,
538538 if (nextSepIndex < 0 ) { // if none found, use beyond end of String
539539 nextSepIndex = line .length ();
540540 }
541+ // first of all, check if the field between the last and next seps is zero length, if yes
542+ // just ignore it (see issue #24
543+ if (nextSepIndex -lastSepIndex == 1 ) {
544+ lastSepIndex = nextSepIndex ;
545+ continue ;
546+ }
541547 // find the first equals character in the string section for this feature
542548 int equalsIndex = line .indexOf ('=' , lastSepIndex + 1 );
543549 //logger.info("lastSepIndex="+lastSepIndex+", nextSepIndex="+nextSepIndex+", equalsIndex="+equalsIndex);
0 commit comments