java: Questionable use of non-short-circuit logic

Change-Id: Ied831cb5d6645e2696ff2d3d57843fc7a1f82f7e
Reviewed-on: https://gerrit.libreoffice.org/12137
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>