analysis: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / tmf / core / event / aspect / TmfStateSystemAspect.java
index 6fb774743c50851bbf6d4776628b61e1a7e92931..a43a451dd02a5154a1dd795c1f06e2b71afa3afb 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2014 Ericsson
+ * Copyright (c) 2014, 2015 Ericsson
  *
  * All rights reserved. This program and the accompanying materials are made
  * available under the terms of the Eclipse Public License v1.0 which
@@ -12,6 +12,8 @@
 
 package org.eclipse.tracecompass.tmf.core.event.aspect;
 
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.eclipse.osgi.util.NLS;
@@ -61,7 +63,7 @@ public class TmfStateSystemAspect implements ITmfEventAspect {
         }
 
         name = fSS.getFullAttributePath(fAttribute);
-        return (name == null ? EMPTY_STRING : name);
+        return name;
     }
 
     @Override
@@ -71,21 +73,12 @@ public class TmfStateSystemAspect implements ITmfEventAspect {
     }
 
     @Override
-    public String resolve(ITmfEvent event) {
+    public @Nullable String resolve(ITmfEvent event) {
         try {
             ITmfStateValue value = fSS.querySingleState(event.getTimestamp().getValue(), fAttribute).getStateValue();
-
-            @SuppressWarnings("null")
-            @NonNull String ret = value.toString();
-            return ret;
+            return checkNotNull(value.toString());
         } catch (AttributeNotFoundException | StateSystemDisposedException e) {
-            return EMPTY_STRING;
+            return null;
         }
     }
-
-    @Override
-    public @Nullable String getFilterId() {
-        return null;
-    }
-
 }
This page took 0.026995 seconds and 5 git commands to generate.