SRADA-1040: fix bug with missing Processes chart
authorVladislav Eliseev <v.eliseev@samsung.com>
Mon, 12 Sep 2016 09:27:43 +0000 (12:27 +0300)
committerVladislav Eliseev <v.eliseev@samsung.com>
Wed, 14 Sep 2016 06:52:41 +0000 (15:52 +0900)
* Due to wrong synchronization Processes chart is not
  created second time.
* Bug related to the FindBugs MT_CORRECTNESS warning.
* Bug introduced in SRADA-703, commit ea27fce.

Change-Id: I87ba2ea3785e601b2e72782ffb00a4b54a5fe774

org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/CPUChart.java

index c5869ff..c5fb84c 100755 (executable)
@@ -78,8 +78,6 @@ public class CPUChart extends TimelineChart {
        private DAChartBoardItem item = null;
        private DAChartBoardHeightChangeableItem processItem = null;
        private Map<Integer, DAChartSeries> childSeriesMap;
-       
-       private Boolean isProcessChart = false;
 
        public CPUChart(String pageID) {
                super(pageID);
@@ -148,14 +146,9 @@ public class CPUChart extends TimelineChart {
                        Display.getDefault().syncExec(new Runnable() {
                                @Override
                                public void run() {
-                                       synchronized (isProcessChart) {
-                                               if(isProcessChart == false) {
-                                                       isProcessChart = true;
-                                               }
-                                               else {
-                                                       return;
-                                               }
-                                       }
+                                       if (processItem != null)
+                                               return;
+
                                        processItem = new DAChartBoardHeightChangeableItem(item, "Processes");
                                        processItem.useExpand(false);