No need to dispose Colors.
Change-Id: Ia425dc314e8cebd89291cd4e0ab0b1eb191e7d24
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/BarGraph.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/BarGraph.java
index bc5a36b..52e5b98 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/BarGraph.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/BarGraph.java
@@ -94,8 +94,8 @@
} else {
// we calculate the max width
int maxNameLength= 0;
- for (int i= 0; i < bars.length; i++) {
- Point es= gc.stringExtent(bars[i].title);
+ for (BarItem bar : bars) {
+ Point es= gc.stringExtent(bar.title);
maxNameLength= Math.max(maxNameLength, es.x);
}
w= width - maxNameLength - TGAP - 2 * MARGIN;
@@ -114,8 +114,8 @@
// determine maximum of values
double max= 0.0;
- for (int i= 0; i < bars.length; i++)
- max= Math.max(max, Math.abs(bars[i].value));
+ for (BarItem bar2 : bars)
+ max= Math.max(max, Math.abs(bar2.value));
double d;
if (NO_SCALE) {
@@ -278,9 +278,6 @@
}
}
- lightblue.dispose();
- red.dispose();
- green.dispose();
}
public String getAreas() {