fix exception not caught

Change-Id: Idf1942d76f3c13e207f2e54494557ee01013c833
java: remove modifiers implied by the context

found by PMD

Change-Id: I04cbf986ddbcffff987784f381b8a9f52f1b3f31