Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/AbstractChartBuilder.java')
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/AbstractChartBuilder.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/AbstractChartBuilder.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/AbstractChartBuilder.java
index 32b20f2caf..25ee92aa54 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/AbstractChartBuilder.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/AbstractChartBuilder.java
@@ -169,14 +169,21 @@ public abstract class AbstractChartBuilder extends Composite implements IUpdateL
handleUpdateEvent();
}
- protected double getDoubleValue(Object o) {
+ protected Double getDoubleValue(Object o) {
+ if (o == null) {
+ return null;
+ }
if (o instanceof Integer) {
- return ((Integer)o).intValue();
+ return ((Integer)o).doubleValue();
}
if (o instanceof Double) {
- return ((Double)o).doubleValue();
+ return (Double) o;
+ }
+ try {
+ return new Double(o.toString());
+ } catch (NumberFormatException e) {
+ return null;
}
- return new Double(o.toString()).doubleValue();
}
@Override

Back to the top