Merge branch 'master' into lttng-kepler
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / internal / tmf / ui / parsers / custom / CustomXmlTraceContext.java
index 0dd484f9ce905e8d1a18c5cfb673f07b7fac377e..2501653376a2af442a616e3890b98c4aa88ec110 100644 (file)
@@ -1,75 +1,49 @@
-/*******************************************************************************\r
- * Copyright (c) 2010 Ericsson\r
- * \r
- * All rights reserved. This program and the accompanying materials are\r
- * made available under the terms of the Eclipse Public License v1.0 which\r
- * accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- * \r
- * Contributors:\r
- *   Patrick Tasse - Initial API and implementation\r
- *******************************************************************************/\r
-\r
-package org.eclipse.linuxtools.internal.tmf.ui.parsers.custom;\r
-\r
-import java.io.IOException;\r
-\r
-import org.eclipse.linuxtools.tmf.core.io.BufferedRandomAccessFile;\r
-import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;\r
-import org.eclipse.linuxtools.tmf.core.trace.TmfContext;\r
-\r
-public class CustomXmlTraceContext extends TmfContext {\r
-    public BufferedRandomAccessFile raFile;\r
-\r
-    public CustomXmlTraceContext(ITmfLocation<?> location, long rank) {\r
-        super(location, rank);\r
-    }\r
-\r
-    @Override\r
-    public void dispose() {\r
-        if (raFile != null) {\r
-            try {\r
-                raFile.close();\r
-            } catch (IOException e) {\r
-            }\r
-        }\r
-        super.dispose();\r
-    }\r
-\r
-    /* (non-Javadoc)\r
-     * @see java.lang.Object#hashCode()\r
-     */\r
-    @Override\r
-    public int hashCode() {\r
-        final int prime = 31;\r
-        int result = super.hashCode();\r
-        result = prime * result + ((raFile == null) ? 0 : raFile.hashCode());\r
-        return result;\r
-    }\r
-\r
-    /* (non-Javadoc)\r
-     * @see java.lang.Object#equals(java.lang.Object)\r
-     */\r
-    @Override\r
-    public boolean equals(Object obj) {\r
-        if (this == obj) {\r
-            return true;\r
-        }\r
-        if (!super.equals(obj)) {\r
-            return false;\r
-        }\r
-        if (!(obj instanceof CustomXmlTraceContext)) {\r
-            return false;\r
-        }\r
-        CustomXmlTraceContext other = (CustomXmlTraceContext) obj;\r
-        if (raFile == null) {\r
-            if (other.raFile != null) {\r
-                return false;\r
-            }\r
-        } else if (!raFile.equals(other.raFile)) {\r
-            return false;\r
-        }\r
-        return true;\r
-    }\r
-\r
+/*******************************************************************************
+ * Copyright (c) 2010 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Patrick Tasse - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.tmf.ui.parsers.custom;
+
+import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
+import org.eclipse.linuxtools.tmf.core.trace.TmfContext;
+
+public class CustomXmlTraceContext extends TmfContext {
+
+    public CustomXmlTraceContext(ITmfLocation location, long rank) {
+        super(location, rank);
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return super.hashCode();
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!super.equals(obj)) {
+            return false;
+        }
+        if (!(obj instanceof CustomXmlTraceContext)) {
+            return false;
+        }
+        return true;
+    }
+
 }
\ No newline at end of file
This page took 0.025623 seconds and 5 git commands to generate.