Bug 576335 - getString: Avoid throw & catch of MissingResourceException

getString() needs to check the key with ResourceBundle#containsKey().
This avoids that a MissingResourceException could be caused and thus the
overhead of creating multiple exceptions and catching them to implement
the fallback behavior.

Additional refactoring: Replace
  !file.trim().isEmpty()
->!file.isBlank()

Change-Id: If40627146628c9302487b128daf678613c148899
Signed-off-by: Karsten Thoms <karsten.thoms@karakun.com>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/185961
Tested-by: Platform Bot <platform-bot@eclipse.org>
Reviewed-by: Jörg Kubitz <jkubitz-eclipse@gmx.de>
1 file changed