Reduce scope of json variable

Previously this was used to create the sha1 for the filesystem key, but
since that is no longer the case, it is not needed in the contructor and
the scope can be reduced.

Change-Id: Ib3baebac97c8f11bd2f08edd62602ddb3ec47a83
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java
index d60bd11..554f8bb 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java
@@ -292,7 +292,6 @@
 
   private class Task {
     public final ReplicateRefUpdate update;
-    public final String json;
     public final String taskKey;
     public final Path running;
     public final Path waiting;
@@ -307,7 +306,6 @@
 
     public Task(UriLock lock, String ref) {
       update = new ReplicateRefUpdate(lock.update, ref);
-      json = GSON.toJson(update) + "\n";
       String key = update.project + "\n" + update.ref + "\n" + update.uri + "\n" + update.remote;
       taskKey = sha1(key).name();
       running = lock.runningDir.resolve(taskKey);
@@ -319,6 +317,7 @@
         return taskKey;
       }
 
+      String json = GSON.toJson(update) + "\n";
       try {
         Path tmp = Files.createTempFile(createDir(buildingUpdates), taskKey, null);
         logger.atFine().log("CREATE %s %s", tmp, updateLog());