You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by ss...@apache.org on 2011/09/27 15:35:08 UTC
svn commit: r1176380 -
/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java
Author: ssc
Date: Tue Sep 27 13:35:08 2011
New Revision: 1176380
URL: http://svn.apache.org/viewvc?rev=1176380&view=rev
Log:
MAHOUT-819 NullPointerException in matrix vector multiplication in TimesSquaredJob
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java
Modified: mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java?rev=1176380&r1=1176379&r2=1176380&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java Tue Sep 27 13:35:08 2011
@@ -245,7 +245,9 @@ public final class TimesSquaredJob {
@Override
public void close() throws IOException {
- out.collect(NullWritable.get(), new VectorWritable(outputVector));
+ if (out != null) {
+ out.collect(NullWritable.get(), new VectorWritable(outputVector));
+ }
}
}