Skip to content

Commit

Permalink
fix NPE on missing crawldepth_i
Browse files Browse the repository at this point in the history
  • Loading branch information
reger committed May 14, 2016
1 parent 4e08929 commit eb2a00b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/net/yacy/crawler/data/Transactions.java
Expand Up @@ -151,7 +151,9 @@ public static boolean store(final SolrInputDocument doc, final boolean concurren
// GET METADATA FROM DOC
final String urls = (String) doc.getFieldValue(CollectionSchema.sku.getSolrFieldName());
final Date date = (Date) doc.getFieldValue(CollectionSchema.load_date_dt.getSolrFieldName());
final int depth = (Integer) doc.getFieldValue(CollectionSchema.crawldepth_i.getSolrFieldName());
final Integer o_depth = (Integer) doc.getFieldValue(CollectionSchema.crawldepth_i.getSolrFieldName()); // may return null
final int depth = o_depth == null ? 0 : o_depth.intValue();

DigestURL url;
try {
url = new DigestURL(urls);
Expand Down

0 comments on commit eb2a00b

Please sign in to comment.