Ensure call to finish to prevent memory leak in JRuby