From 1cc120e690392e88f570c58ad1782cd974878ecd Mon Sep 17 00:00:00 2001 From: coderfengyun Date: Fri, 3 Jan 2014 16:28:39 +0800 Subject: [PATCH] refactor with synchronize --- .../bench4q/agent/datacollector/impl/PageResultCollector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bench4q/agent/datacollector/impl/PageResultCollector.java b/src/main/java/org/bench4q/agent/datacollector/impl/PageResultCollector.java index 0a12d3b1..7638549f 100644 --- a/src/main/java/org/bench4q/agent/datacollector/impl/PageResultCollector.java +++ b/src/main/java/org/bench4q/agent/datacollector/impl/PageResultCollector.java @@ -41,7 +41,7 @@ public class PageResultCollector extends AbstractDataCollector { } } - private PageBrief guardTheValueOfThePageIdExists(int pageId) { + private synchronized PageBrief guardTheValueOfThePageIdExists(int pageId) { if (!this.getPageBriefMap().containsKey(pageId)) { this.getPageBriefMap().put(pageId, new PageBrief()); }