From 419ca3dc053682d688653e9a64eaaf46018fd330 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 15 Aug 2018 20:22:04 -0700 Subject: scorable: test for null strings --- scalding/src/main/scala/sandcrawler/CrossrefScorable.scala | 1 + 1 file changed, 1 insertion(+) (limited to 'scalding/src/main/scala/sandcrawler/CrossrefScorable.scala') diff --git a/scalding/src/main/scala/sandcrawler/CrossrefScorable.scala b/scalding/src/main/scala/sandcrawler/CrossrefScorable.scala index 4897b1c..ff8201a 100644 --- a/scalding/src/main/scala/sandcrawler/CrossrefScorable.scala +++ b/scalding/src/main/scala/sandcrawler/CrossrefScorable.scala @@ -34,6 +34,7 @@ object CrossrefScorable { if (titles.isEmpty || titles == null || doi.isEmpty || doi == null) { new MapFeatures(Scorable.NoSlug, json) } else { + // bnewbold: not checking that titles(0) is non-null/non-empty; case would be, in JSON, "title": [ null ] val sf : ScorableFeatures = new ScorableFeatures(title=titles(0), doi=doi) new MapFeatures(sf.toSlug, sf.toString) } -- cgit v1.2.3