java,framework: remove unused vars and parameters

Change-Id: I7df5ff730436b95cb93af9f813d7bc572da2b951
Reviewed-on: https://gerrit.libreoffice.org/13098
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>