Quantcast
Channel: Mobile - Couchbase Forums
Viewing all articles
Browse latest Browse all 1117

Purging Null Documents

$
0
0

Hi All,

Need a little help here . I am trying to delete the null documents while uploading the data to the server.
My code looks something like this . However , I get an error saying “java.lang.IllegalArgumentException: document cannot be null”

I am not sure how these null documents are created but I want to delete them before uploading data to the server .Any suggestions please?

Document d = database.getDocument(result.getString(“id”));
try
{
}
catch (NullPointerException e) {

                            database.purge(d);

}

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 1117

Trending Articles