mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r805793 - /lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java
Date Wed, 19 Aug 2009 13:20:21 GMT
Author: srowen
Date: Wed Aug 19 13:20:21 2009
New Revision: 805793

URL: http://svn.apache.org/viewvc?rev=805793&view=rev
Log:
Oops, fix bug in my last improvement

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java?rev=805793&r1=805792&r2=805793&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java
Wed Aug 19 13:20:21 2009
@@ -193,7 +193,7 @@
     } else {
       throw new IllegalArgumentException("Did not find a delimiter in first line");
     }
-    int delimiterCount = 1;
+    int delimiterCount = 0;
     int lastDelimiter = line.indexOf(delimiter);
     int nextDelimiter;
     while ((nextDelimiter = line.indexOf(delimiter, lastDelimiter + 1)) >= 0) {
@@ -205,6 +205,7 @@
         // empty field
         throw new IllegalArgumentException("Empty field");
       }
+      lastDelimiter = nextDelimiter;
     }
     return delimiter;
   }



Mime
View raw message