Fix NPE when submitting review with inline comments via REST

NPE occurs when submitting a review with inline comments in
the format:

  {
    "comments": {
      "test.txt": [
        {
          "line": 1,
          "message": "comment"
        },
      ]
    }
  }

The comma following the closing brace after the `"message": "comment"`
line seems to be causing an iterator with a null element to be
generated.

NPE does not occur when the comma is omitted.

To prevent the NPE remove the null element from the iterator.

Change-Id: I248739fce955522f7ee4a93441e48914342d3d7d
Fix NPE in /projects/{name}/children?recursive when a parent is missing

If there is a broken edge in the parent graph treat it as having no
children instead of throwing NPE and failing the REST API call.

Change-Id: Ib72f76f04f5804d2b953f0951d3304fc1d6329a2
Fix NPE when ReviewInput's message is empty

Bug: Issue 2877
Change-Id: I3d31af8cdcc26c2dc48c316542f55c402fd63832
Bump guava version to 18.0

New version fixes 16 bugs and includes some API changes [1].
MoreExecutors.directExecutor() is now the new lightweight version
of now deprecated sameThreadExecutor().

[1] https://code.google.com/p/guava-libraries/wiki/Release18

Change-Id: I98dbf951b82095504272cc90f1468652621ae2bd
Move TempFileUtil to testutil package

Move the TempFileUtil helper class to testutil package in gerrit-server
as it is valuable not only in acceptance tests.

Change-Id: Ied3706b5eafbcfc1c749607ab83312f39b2284e4
Merge "Fix NPE when ReviewInput's message is empty" into stable-2.9
Merge "Fix NPE when submitting review with inline comments via REST" into stable-2.9
Merge "Fix NPE in /projects/{name}/children?recursive when a parent is missing" into stable-2.9
Merge branch 'stable-2.9' into stable-2.10

* stable-2.9:
  Fix NPE when ReviewInput's message is empty
  Fix NPE in /projects/{name}/children?recursive when a parent is missing
  Fix NPE when submitting review with inline comments via REST

Conflicts:
	gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java

Change-Id: Icfde6f0274f0ccc92773fd5a376e8c27099437ac
Remove LuceneQueryChangesV7Test

This mostly existed because we were stuck on V7 for googlesource.com
for a while, so we needed to ensure that version still worked. We've
been upgraded for a few months now, so this is no longer necessary.

Change-Id: I25f3621cb9c16b0680d90a950af4e69500c77212
CommentsTest: @Inject members instead of using getInstance

Change-Id: I96934c806ca3418b4ab830957b8c8c261752dad2
Merge "Remove LuceneQueryChangesV7Test"
Merge "CommentsTest: @Inject members instead of using getInstance"
Merge branch 'stable-2.10'

* stable-2.10:
  Fix NPE when ReviewInput's message is empty
  Fix NPE in /projects/{name}/children?recursive when a parent is missing
  Fix NPE when submitting review with inline comments via REST

Change-Id: I134262b063c952b595b0dcfed4ad373603b6a150
Add Java 7 requirement for building gerrit

We don't support building with Java 8 yet, add the information to
build documentation.

Change-Id: I88b28b23e7c1275a44a8c8fa6082edae5df3333a
Merge "Bump guava version to 18.0"
Allow to suppress HTML when converting Markdown to HTML

Markdown files may contain HTML snippets. When generating HTML out of
Markdown files the HTML snippets may be suppressed. Suppressing these
HTML snippets is important when the Markdown files are provided by
users and the HTML snippets may contain malicious code.

Gerrit core doesn't need to suppress HTML at the moment, but for
Gerrit plugins that want to use the MarkdownFormatter from Gerrit the
possibility to suppress HTML is important.

Change-Id: Ic847d2bdd6bc16e3f44cd45a30ce0a201aa3a1de
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Merge "Move TempFileUtil to testutil package"
AbstractChangeNotesTest: inject members instead of using getInstance()

Change-Id: Idf1371f3230eb156e0688c6580c5d1d0fe463a90
Merge "Add Java 7 requirement for building gerrit"