Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Montplaisir2012-05-14 19:55:57 +0000
committerAlexandre Montplaisir2012-05-14 20:33:14 +0000
commit9717105d88b99b6cac0afd66fa70f6cbeb03df06 (patch)
tree59fd2dbfb929703c4881e2e03afb46723238b4d6 /lttng/org.eclipse.linuxtools.tmf.core
parenta2a24b81de258bbca003a225290788048ea23b2b (diff)
downloadorg.eclipse.linuxtools-9717105d88b99b6cac0afd66fa70f6cbeb03df06.tar.gz
org.eclipse.linuxtools-9717105d88b99b6cac0afd66fa70f6cbeb03df06.tar.xz
org.eclipse.linuxtools-9717105d88b99b6cac0afd66fa70f6cbeb03df06.zip
tmf: Work around a simple CtfTmfEventType warning
The automatic assign-on-construction isn't ideal, but at least we expect this behavior. Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Diffstat (limited to 'lttng/org.eclipse.linuxtools.tmf.core')
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventType.java6
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java11
2 files changed, 10 insertions, 7 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventType.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventType.java
index 7cd7b83602..ee72e09ce3 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventType.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventType.java
@@ -26,8 +26,7 @@ public class CtfTmfEventType extends TmfEventType {
* @param eventName String
* @param content ITmfEventField
*/
- public CtfTmfEventType( String eventName,
- ITmfEventField content) {
+ public CtfTmfEventType(String eventName, ITmfEventField content) {
super(CONTEXT_ID, eventName, content);
}
@@ -36,8 +35,7 @@ public class CtfTmfEventType extends TmfEventType {
* @return String
*/
@Override
- public String toString()
- {
+ public String toString() {
return this.getName();
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java
index 4e52ce4d1e..1a329e34ed 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java
@@ -81,17 +81,22 @@ public class CtfTmfTrace extends TmfEventProvider<CtfTmfEvent> implements ITmfTr
@Override
public void initTrace(final IResource resource, final String path, final Class<CtfTmfEvent> eventType)
throws TmfTraceException {
+ EventDeclaration ed;
+ ITmfEventField eventField;
+ @SuppressWarnings("unused")
+ CtfTmfEventType type;
+
this.fResource = resource;
try {
this.fTrace = new CTFTrace(path);
for( int i =0 ; i< this.fTrace.getNbEventTypes(); i++) {
- EventDeclaration ed = this.fTrace.getEventType(i);
- ITmfEventField eventField = parseDeclaration(ed);
+ ed = this.fTrace.getEventType(i);
+ eventField = parseDeclaration(ed);
/*
* Populate the event manager with event types that are there in
* the beginning.
*/
- new CtfTmfEventType(ed.getName(), eventField);
+ type = new CtfTmfEventType(ed.getName(), eventField);
}
/* Set the start and (current) end times for this trace */

Back to the top