Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lttng/org.eclipse.linuxtools.statesystem.core/src/org/eclipse/linuxtools/internal/statesystem/core/AttributeTree.java32
1 files changed, 8 insertions, 24 deletions
diff --git a/lttng/org.eclipse.linuxtools.statesystem.core/src/org/eclipse/linuxtools/internal/statesystem/core/AttributeTree.java b/lttng/org.eclipse.linuxtools.statesystem.core/src/org/eclipse/linuxtools/internal/statesystem/core/AttributeTree.java
index 96f15267f3..965d70272e 100644
--- a/lttng/org.eclipse.linuxtools.statesystem.core/src/org/eclipse/linuxtools/internal/statesystem/core/AttributeTree.java
+++ b/lttng/org.eclipse.linuxtools.statesystem.core/src/org/eclipse/linuxtools/internal/statesystem/core/AttributeTree.java
@@ -12,16 +12,19 @@
package org.eclipse.linuxtools.internal.statesystem.core;
-import java.io.*;
+import java.io.BufferedInputStream;
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.RandomAccessFile;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.linuxtools.statesystem.core.statevalue.TmfStateValue;
/**
* The Attribute Tree is the /proc-like filesystem used to organize attributes.
@@ -291,26 +294,7 @@ public final class AttributeTree {
}
prevNode = nextNode;
}
- /*
- * Insert an initial null value for this attribute in the state
- * system (in case the state provider doesn't set one).
- */
- final int newAttrib = attributeList.size() - 1;
- try {
- ss.modifyAttribute(ss.getStartTime(), TmfStateValue.nullValue(), newAttrib);
- } catch (TimeRangeException e) {
- /* Should not happen, we're inserting at ss's start time */
- throw new IllegalStateException(e);
- } catch (AttributeNotFoundException e) {
- /* Should not happen, we just created this attribute! */
- throw new IllegalStateException(e);
- } catch (StateValueTypeException e) {
- /* Should not happen, there is no existing state value, and the
- * one we insert is a null value anyway. */
- throw new IllegalStateException(e);
- }
-
- return newAttrib;
+ return attributeList.size() - 1;
}
/*
* The attribute was already existing, return the quark of that

Back to the top