From a57bbd22a65a33433ff495bfa395d604f7b1c7c0 Mon Sep 17 00:00:00 2001 From: Patrick Tasse Date: Tue, 22 May 2012 17:24:45 -0400 Subject: [PATCH] Revert "More resources closes" for file still in use. --- .../internal/tmf/ui/parsers/custom/CustomTxtTrace.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java index 1ed80c0a47..4fbbe2ee6e 100644 --- a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java +++ b/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 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 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) { - } - } } } -- 2.34.1