-small refactoring and java doc update

Signed-off-by: Mario <mariojothy@gmail.com>
-Quickfix for an unwanted change, that wasn't compatible with the current java version

Signed-off-by: Mario <mariojothy@gmail.com>