/*******************************************************************************
- * 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
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;
}
name = fSS.getFullAttributePath(fAttribute);
- return (name == null ? EMPTY_STRING : name);
+ return name;
}
@Override
}
@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;
- }
-
}