final CustomTxtTraceContext context = new CustomTxtTraceContext(NULL_LOCATION, ITmfContext.UNKNOWN_RANK);\r
if (NULL_LOCATION.equals(location) || !new File(getPath()).isFile())\r
return context;\r
- BufferedRandomAccessFile raFile = null;\r
try {\r
- raFile = new BufferedRandomAccessFile(getPath(), "r"); //$NON-NLS-1$\r
+ BufferedRandomAccessFile raFile = new BufferedRandomAccessFile(getPath(), "r"); //$NON-NLS-1$\r
if (location != null && location.getLocation() instanceof Long) {\r
raFile.seek((Long)location.getLocation());\r
}\r
} catch (final IOException e) {\r
TmfUiPlugin.getDefault().logError("Error seeking event. File: " + getPath(), e); //$NON-NLS-1$\r
return context;\r
- } finally {\r
- if (raFile != null) {\r
- try {\r
- raFile.close();\r
- } catch (final IOException e) {\r
- }\r
- }\r
}\r
\r
}\r