mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject svn commit: r771475 - /lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/BooleanTanimotoCoefficientSimilarity.java
Date Mon, 04 May 2009 22:25:50 GMT
Author: otis
Date: Mon May  4 22:25:50 2009
New Revision: 771475

URL: http://svn.apache.org/viewvc?rev=771475&view=rev
Log:
- Removed null checks which should be caught by the instanceof checks at the beginning of
the method

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/BooleanTanimotoCoefficientSimilarity.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/BooleanTanimotoCoefficientSimilarity.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/BooleanTanimotoCoefficientSimilarity.java?rev=771475&r1=771474&r2=771475&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/BooleanTanimotoCoefficientSimilarity.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/BooleanTanimotoCoefficientSimilarity.java
Mon May  4 22:25:50 2009
@@ -54,10 +54,6 @@
 
   @Override
   public double userSimilarity(User user1, User user2) {
-
-    if (user1 == null || user2 == null) {
-      throw new IllegalArgumentException("user1 or user2 is null");
-    }
     if (!(user1 instanceof BooleanPrefUser && user2 instanceof BooleanPrefUser))
{
       throw new IllegalArgumentException();
     }
@@ -86,4 +82,4 @@
     return "BooleanTanimotoCoefficientSimilarity[dataModel:" + dataModel + ']';
   }
 
-}
\ No newline at end of file
+}



Mime
View raw message