You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@any23.apache.org by le...@apache.org on 2013/08/25 22:45:17 UTC

git commit: ANY23-115 Empty spans seem to break ANY23

Updated Branches:
  refs/heads/master 4535919bc -> 5195ebaa8


ANY23-115 Empty spans seem to break ANY23


Project: http://git-wip-us.apache.org/repos/asf/any23/repo
Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/5195ebaa
Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/5195ebaa
Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/5195ebaa

Branch: refs/heads/master
Commit: 5195ebaa806d108791bb7ce449644ed93b62e882
Parents: 4535919
Author: lewismc <le...@gmail.com>
Authored: Sun Aug 25 13:45:07 2013 -0700
Committer: lewismc <le...@gmail.com>
Committed: Sun Aug 25 13:45:07 2013 -0700

----------------------------------------------------------------------
 .../org/apache/any23/extractor/microdata/ItemPropValue.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/any23/blob/5195ebaa/core/src/main/java/org/apache/any23/extractor/microdata/ItemPropValue.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/any23/extractor/microdata/ItemPropValue.java b/core/src/main/java/org/apache/any23/extractor/microdata/ItemPropValue.java
index f07dcf2..0dcad10 100644
--- a/core/src/main/java/org/apache/any23/extractor/microdata/ItemPropValue.java
+++ b/core/src/main/java/org/apache/any23/extractor/microdata/ItemPropValue.java
@@ -86,7 +86,12 @@ public class ItemPropValue {
             );
         }
         if(content instanceof String && ((String) content).trim().length() == 0) {
-            throw new IllegalArgumentException("Invalid content '" + content + "'");
+            content = "Null";
+            // ANY23-115 Empty spans seem to break ANY23
+            // instead of throwing the exception and in effect failing the entire 
+            // parse job we wish to be lenient on web content publishers and add
+            // Null (String) as content.
+            //throw new IllegalArgumentException("Invalid content '" + content + "'");
         }
         this.content = content;
         this.type = type;