Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Tasse2012-05-22 21:24:45 +0000
committerPatrick Tasse2012-05-22 21:24:45 +0000
commit6ffd4d608495cbbd5748abc41b1def233146c81e (patch)
treebabc7474bbe9a8701ea858a9e5bca3ac9243765e
parent3fb7d9d7cdd275d27588e86d6d6319d457bd6e44 (diff)
downloadorg.eclipse.linuxtools-6ffd4d608495cbbd5748abc41b1def233146c81e.tar.gz
org.eclipse.linuxtools-6ffd4d608495cbbd5748abc41b1def233146c81e.tar.xz
org.eclipse.linuxtools-6ffd4d608495cbbd5748abc41b1def233146c81e.zip
Revert "More resources closes" for file still in use.
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java10
1 files changed, 1 insertions, 9 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java
index 1ed80c0a47..4fbbe2ee6e 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java
@@ -64,9 +64,8 @@ public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> implements ITmfEven
final CustomTxtTraceContext context = new CustomTxtTraceContext(NULL_LOCATION, ITmfContext.UNKNOWN_RANK);
if (NULL_LOCATION.equals(location) || !new File(getPath()).isFile())
return context;
- BufferedRandomAccessFile raFile = null;
try {
- raFile = new BufferedRandomAccessFile(getPath(), "r"); //$NON-NLS-1$
+ BufferedRandomAccessFile raFile = new BufferedRandomAccessFile(getPath(), "r"); //$NON-NLS-1$
if (location != null && location.getLocation() instanceof Long) {
raFile.seek((Long)location.getLocation());
}
@@ -94,13 +93,6 @@ public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> implements ITmfEven
} catch (final IOException e) {
TmfUiPlugin.getDefault().logError("Error seeking event. File: " + getPath(), e); //$NON-NLS-1$
return context;
- } finally {
- if (raFile != null) {
- try {
- raFile.close();
- } catch (final IOException e) {
- }
- }
}
}

Back to the top