{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/620","labels_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/620/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/620/comments","events_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/620/events","html_url":"https://github.com/chrsmith/google-api-java-client/issues/620","id":59382398,"number":620,"title":"Batch requests should allow null callbacks","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Component-HTTP","name":"Component-HTTP","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Type-Enhancement","name":"Type-Enhancement","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-01T05:59:00Z","updated_at":"2015-03-01T05:59:01Z","closed_at":null,"body":"```\nVersion of google-api-java-client (e.g. 1.5.0-beta)?\n\nHEAD\n\n\nJava environment (e.g. Java 6, Android 2.3, App Engine)?\n\nApp Engine\n\n\nDescribe the problem.\n\nI'd like to perform a batch request, but I don't particularly care about the \nrespective responses. I essentially want to \"fire and forget\" a series of API \nrequests.\n\nCurrently I'm calling:\n\nBatchRequest batch = compute.batch();\nfor (...) {\n  compute.instances().insert(...).queue(batch, null);\n}\nbatch.execute();\n\nThis results in an NPE because of a Preconditions.checkNotNull check on the \ncallback:\njava.lang.NullPointerException\n\tat com.google.common.base.Preconditions.checkNotNull(Preconditions.java:193)\n\tat com.google.api.client.googleapis.batch.BatchRequest.queue(BatchRequest.java:161)\n\tat com.google.api.services.compute.Compute$Instances$Insert.queue(Compute.java:2642)\n\n\n\n\nHow would you expect it to be fixed?\n\nEither remove the checkNotNull check, or provide another queue() method that \ndoesn't take a callback. Ideally requests that don't configure a callback would \nalso skip parsing of the response entirely, since nothing downstream requires \nany details of the response.\n\nThis would lead to clearer more succinct code than the current working \nalternative, which is to define a no-op JsonBatchCallback instance that does \nnothing.\n```\n\nOriginal issue reported on code.google.com by `jasonhall@google.com` on 1 Oct 2012 at 4:31"},"comment":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/comments/76577617","html_url":"https://github.com/chrsmith/google-api-java-client/issues/620#issuecomment-76577617","issue_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/620","id":76577617,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-03-01T05:59:01Z","updated_at":"2015-03-01T05:59:01Z","body":"\n\nOriginal comment by `yan...@google.com` on 22 Jan 2013 at 4:14\n* Added labels: **Type-Enhancement**, **Milestone-Version2.1.0**\n* Removed labels: **Type-Defect**, **Milestone-Version1.14.0**"}}