Details
-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Minor
-
Resolution: Duplicate
-
Component/s: plot-plugin
-
Labels:None
-
Environment:Linux 2.6.18-194.17.4.el5 x86_64 x86_64 x86_64 GNU/Linux
Jenkins ver. 1.399
Plot plugin 1.3
-
Similar Issues:
Description
Having some hundreds of builds each of which is associated with various performance measurements, the plots of the performance values show different date strings in the labels for same builds.
E.g., build #129 took place on Jul 28 (see attached right date string plot), but for some reason it is written down as Sep 4 in one of the plots (see attached bad date string plot).
The version 1.4 of Plot Plugin had other issues (index out of bounds and some SimpleDateFormatter issues reported elsewhere).
Attachments
Issue Links
- is related to
-
JENKINS-9662 Plot plugin version 1.3 crashes with ArrayIndexOutOfBoundsException
-
- Resolved
-
The DateFormat is not thread-safe, and having it as a static variable in a multithreaded environment is problem. The simplest fix would be something like
$ diff original/Plot.java fixed/Plot.java
{ > this.buildDate = DATE_FORMAT.format( > new Date(Long.parseLong(buildTime))); > }497,498c497,500
< this.buildDate = DATE_FORMAT.format(
< new Date(Long.parseLong(buildTime)));
—
> synchronized (DATE_FORMAT)