summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcore/source/core/scala/org/hashtree/stringmetric/JaroMetric.scala2
-rwxr-xr-xcore/source/core/scala/org/hashtree/stringmetric/JaroWinklerMetric.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/source/core/scala/org/hashtree/stringmetric/JaroMetric.scala b/core/source/core/scala/org/hashtree/stringmetric/JaroMetric.scala
index 31e6a48..0161212 100755
--- a/core/source/core/scala/org/hashtree/stringmetric/JaroMetric.scala
+++ b/core/source/core/scala/org/hashtree/stringmetric/JaroMetric.scala
@@ -28,7 +28,7 @@ object JaroMetric extends StringMetric {
override def compare(string1: String, string2: String)(implicit stringCleaner: StringCleaner): Float = {
// Return 1 if strings are an exact match.
- if (string1.length > 0 && string2.length > 0 && string1 == string2) return 1f
+ if (string1.length > 0 && string1 == string2) return 1f
compare(stringCleaner.clean(string1.toCharArray), stringCleaner.clean(string2.toCharArray))(new StringCleanerDelegate)
}
diff --git a/core/source/core/scala/org/hashtree/stringmetric/JaroWinklerMetric.scala b/core/source/core/scala/org/hashtree/stringmetric/JaroWinklerMetric.scala
index f21cc54..aab8cd9 100755
--- a/core/source/core/scala/org/hashtree/stringmetric/JaroWinklerMetric.scala
+++ b/core/source/core/scala/org/hashtree/stringmetric/JaroWinklerMetric.scala
@@ -17,7 +17,7 @@ object JaroWinklerMetric extends StringMetric {
override def compare(string1: String, string2: String)(implicit stringCleaner: StringCleaner): Float = {
// Return 1 if strings are an exact match.
- if (string1.length > 0 && string2.length > 0 && string1 == string2) return 1f
+ if (string1.length > 0 && string1 == string2) return 1f
compare(stringCleaner.clean(string1.toCharArray), stringCleaner.clean(string2.toCharArray))(new StringCleanerDelegate)
}