tmf: Return correct type in SourceLookupPropertySource
authorAlexandre Montplaisir <alexmonthy@efficios.com>
Sun, 10 Apr 2016 01:41:22 +0000 (21:41 -0400)
committerAlexandre Montplaisir <alexmonthy@efficios.com>
Wed, 4 May 2016 20:23:51 +0000 (16:23 -0400)
The "Line" value of the Source Lookup event property displays
correctly, but throws an AssertionFailedException upon clicking
on it.

This is due to the property source returning a Long object
instead of a String. It was using Long.valueOf(long) instead
of String.valueOf(long). Changing the return type highlights
it clearly.

Change-Id: Ie12813c67ef754b2bcf1bb38804b08565847dea8
Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Reviewed-on: https://git.eclipse.org/r/70316
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/events/TmfEventPropertySource.java

index 5276616ad5c7d3fddde43336d2f654bb4579fd6f..adbc9e8565db69ee5abd4501acf289a97236f7c4 100644 (file)
@@ -188,7 +188,7 @@ public class TmfEventPropertySource implements IPropertySource {
         }
 
         @Override
-        public Object getPropertyValue(Object id) {
+        public String getPropertyValue(Object id) {
             ITmfCallsite cs = fSourceLookup.getCallsite();
             if (cs == null) {
                 /*
@@ -208,7 +208,7 @@ public class TmfEventPropertySource implements IPropertySource {
             case ID_FUNCTION_NAME:
                 return cs.getFunctionName();
             case ID_LINE_NUMBER:
-                return Long.valueOf(cs.getLineNumber());
+                return String.valueOf(cs.getLineNumber());
             default:
                 return null;
             }
This page took 0.029352 seconds and 5 git commands to generate.