From 915b5289b02db9c4809b009f4b8d9196c8436104 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Tue, 20 May 2014 10:49:38 +0200 Subject: Reply user ID can be NULL --- src/database/QueryUtils.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/database/QueryUtils.java') diff --git a/src/database/QueryUtils.java b/src/database/QueryUtils.java index a37b806..dac3ffc 100644 --- a/src/database/QueryUtils.java +++ b/src/database/QueryUtils.java @@ -113,7 +113,11 @@ public class QueryUtils { } else { tweetStatement.setLong("retweetid", null); } - tweetStatement.setLong("replyid", tweet.in_reply_to_user_id); + if (tweet.in_reply_to_user_id != null) { + tweetStatement.setLong("replyid", tweet.in_reply_to_user_id); + } else { + tweetStatement.setLong("replyid", null); + } // TODO: place is not a string... if (tweet.place != null) { tweetStatement.setString("place", tweet.place.full_name + " " + tweet.place.country); -- cgit v1.2.1