Return value directly from the try block and avoid a variable

Avoid another temporary variable assignment by directly returning the value from the try block. The finally block will be executed nevertheless.