0

我在这里得到一个 NullPointer,显然是因为我的查询格式不正确。我的印象是我可以通过提供一个与之匹配的对象来查询我的类中的指针列。为什么当前用户不够用?

    ParseUser currentUser = ParseUser.getCurrentUser();

    ParseQuery<ParseObject> requestsQuery = ParseQuery.getQuery("Request");
        requestsQuery.whereEqualTo("author", currentUser);
        requestsQuery.findInBackground(new FindCallback<ParseObject>() {
            @Override
            public void done(List<ParseObject> requestList, ParseException e) {
                if (e == null) {
                    log.info(requestList.toString());

                }

            }
     });

空指针:

[WARNING] 
java.lang.NullPointerException
    at com.nnit.automation.controller.IndexController$1.done(IndexController.java:58)
    at org.parse4j.ParseQuery$FindInBackgroundThread.run(ParseQuery.java:623)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

在此处输入图像描述

4

0 回答 0