{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/facebook-java-business-sdk/issues/156","repository_url":"https://api.github.com/repos/facebook/facebook-java-business-sdk","labels_url":"https://api.github.com/repos/facebook/facebook-java-business-sdk/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/facebook/facebook-java-business-sdk/issues/156/comments","events_url":"https://api.github.com/repos/facebook/facebook-java-business-sdk/issues/156/events","html_url":"https://github.com/facebook/facebook-java-business-sdk/issues/156","id":322273009,"number":156,"title":"Null pointer exception on AsyncExecutor","user":{"login":"tmihalicka","id":1620790,"avatar_url":"https://avatars0.githubusercontent.com/u/1620790?v=4","gravatar_id":"","url":"https://api.github.com/users/tmihalicka","html_url":"https://github.com/tmihalicka","followers_url":"https://api.github.com/users/tmihalicka/followers","following_url":"https://api.github.com/users/tmihalicka/following{/other_user}","gists_url":"https://api.github.com/users/tmihalicka/gists{/gist_id}","starred_url":"https://api.github.com/users/tmihalicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmihalicka/subscriptions","organizations_url":"https://api.github.com/users/tmihalicka/orgs","repos_url":"https://api.github.com/users/tmihalicka/repos","events_url":"https://api.github.com/users/tmihalicka/events{/privacy}","received_events_url":"https://api.github.com/users/tmihalicka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-11T12:05:56Z","updated_at":"2018-05-11T12:05:56Z","closed_at":null,"author_association":"NONE","body":"I'm trying use new 3.0 SDK in Scala but i have problem when i want to call `getInsightsAsync` on AdAcount object this call returns **null pointer exceltion**\r\n\r\nThis coused because AsyncExecutor is not created: \r\n\r\n```SCALA\r\n    val adAccountFutureList = config.adAccount.accounts.map { acc =>\r\n      val addAccount = new AdAccount(acc.id, facebookContext).getInsightsAsync\r\n        .setLevel(config.adAccount.level)\r\n        .setFields(config.adAccount.fields.mkString(\",\"))\r\n        .executeAsync()\r\n        .asScala //deal with facebook shitty promise\r\n\r\n      addAccount\r\n    }\r\n```\r\n\r\nI found solution define AsyncExecutor via static call:\r\n```SCALA\r\nAPIRequest.changeAsyncRequestExecutor(new DefaultAsyncRequestExecutor())\r\n```\r\n\r\nThis is definition in ApiRequest.java\r\n\r\n```JAVA\r\n  private static IRequestExecutor executor = new DefaultRequestExecutor();\r\n  private static IAsyncRequestExecutor asyncExecutor = null;\r\n```\r\n\r\nThis is desired behaviour?\r\n\r\nBecause in example i cannot find any reference to explicitly set `DefaultAsyncRequestExecutor`.\r\n"}}
{"actor":{"display_login":"tmihalicka"}}