javaunohelper: The assigned value is sometimes used

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