diff --git a/appengine/taskqueue/pull/src/main/webapp/WEB-INF/queue.xml b/appengine/taskqueue/pull/src/main/webapp/WEB-INF/queue.xml
deleted file mode 100644
index 6653b5ad7c7..00000000000
--- a/appengine/taskqueue/pull/src/main/webapp/WEB-INF/queue.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
gcloud init- 1. Add your authenticated email account as <user-email> and <writer-email> elements to the queue.xml file of the App Engine app that created the pull queue task you're trying to access. For more details, please see - [Defining Pull Queues](https://cloud.google.com/appengine/docs/java/config/queue#Defining_Pull_Queues) - on the Task Queue configuration page. + 1. Add your authenticated email account as 'user_email' and 'writer_email' elements to the queue.yaml + file of the App Engine app that created the pull queue task you're trying to access. For more details, please see + [Defining Pull Queues](https://cloud.google.com/appengine/docs/java/taskqueue/overview-pull#Java_Defining_pull_queues). * Running the sample on a Google Compute Engine VM using Default Application Credentials: 1. Create a service account and add it to queue.xml 1. In the API Manager > [Credentials](https://pantheon.corp.google.com/apis/credentials) section click "Create credentials" and choose "Service account key". 1. On the "Create service account key" page, select "Compute Engine default service account" from the "Service Account" drop-down menu. Leave the Key type set to JSON and click the "Create" button. 1. Once the service account is created, click the "Manage service accounts" link and copy the "Service account ID" of the "Compute Engine default service account". - 1. Add the "Service account ID" as <user-email> and <writer-email> elements to the queue.xml file of the App Engine app that created the pull queue task you're trying to access. For more details, please see - [Defining Pull Queues](https://cloud.google.com/appengine/docs/java/config/queue#Defining_Pull_Queues) - on the Task Queue configuration page. + 1. Add the "Service account ID" as 'user_email' and 'writer_email' elements to the queue.yaml file of the + App Engine app that created the pull queue task you're trying to access. For more details, please see + [Defining Pull Queues](https://cloud.google.com/appengine/docs/java/taskqueue/overview-pull#Java_Defining_pull_queues). 1. Create a Compute Engine VM Instance. 1. In the [Cloud Console](https://console.cloud.google.com/project) diff --git a/taskqueue/pull/src/main/java/TaskQueueSample.java b/taskqueue/pull/src/main/java/TaskQueueSample.java index a13f03f62b4..5268df52a67 100644 --- a/taskqueue/pull/src/main/java/TaskQueueSample.java +++ b/taskqueue/pull/src/main/java/TaskQueueSample.java @@ -172,8 +172,12 @@ private static Tasks getLeasedTasks(Taskqueue taskQueue) throws IOException { */ private static void processTask(Task task) { byte[] payload = Base64.decodeBase64(task.getPayloadBase64()); - System.out.println("Payload for the task:"); - System.out.println(new String(payload)); + if (payload != null) { + System.out.println("Payload for the task:"); + System.out.println(new String(payload)); + } else { + System.out.println("This task has no payload."); + } } /** * Method that sends a delete request for the specified task object to the taskqueue service.