btf: Remove AutoCloseable from BtfTrace
[deliverable/tracecompass.git] / btf / org.eclipse.tracecompass.btf.core / src / org / eclipse / tracecompass / btf / core / trace / BtfTrace.java
index 7f92f718dd69bfcc6315d7f09420481f058f671d..bffcbe1059f55c31b2acf33100915e836d5a4ebe 100644 (file)
@@ -59,7 +59,7 @@ import com.google.common.collect.ImmutableMap;
  *
  * @author Matthew Khouzam
  */
-public class BtfTrace extends TmfTrace implements ITmfPersistentlyIndexable, ITmfTraceProperties, AutoCloseable {
+public class BtfTrace extends TmfTrace implements ITmfPersistentlyIndexable, ITmfTraceProperties {
 
     private static final int MAX_FIELDS = 7;
 
@@ -450,10 +450,15 @@ public class BtfTrace extends TmfTrace implements ITmfPersistentlyIndexable, ITm
     }
 
     @Override
-    public void close() throws IOException {
-        if (fFileInput != null) {
-            fFileInput.close();
+    public synchronized void dispose() {
+        RandomAccessFile raf = fFileInput;
+        if (raf != null) {
+            try {
+                raf.close();
+            } catch (IOException e) {
+            }
         }
+        super.dispose();
     }
 
 }
This page took 0.024966 seconds and 5 git commands to generate.