'query --comments --format=JSON': fix NPE if change message author is null

Creating the JSON output for a change message fails with a
NullPointerException if the author of the change message is null. The
author of a change message is null if the change message was created by
Gerrit and not by a user (e.g. the message that is added to a change on
submit if the change cannot be merged due to conflicts).

If the user of a change message is null, use the Gerrit Server identity
to generate the author information.

Change-Id: Ia3fb2a63c760cc2341372ddb0358e6f10b5bf435
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
1 file changed