Skip to content

Commit

Permalink
[FIXED JENKINS-9662] thread safety fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alanharder committed Jul 10, 2011
1 parent a6bc56b commit a3fefa5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/hudson/plugins/plot/Plot.java
Expand Up @@ -494,8 +494,10 @@ class Label implements Comparable<Label> {
final private String text;
public Label(String buildNum, String buildTime, String text) {
this.buildNum = Integer.parseInt(buildNum);
this.buildDate = DATE_FORMAT.format(
new Date(Long.parseLong(buildTime)));
synchronized (DATE_FORMAT) {
this.buildDate = DATE_FORMAT.format(
new Date(Long.parseLong(buildTime)));
}
this.text = text;
}
public Label(String buildNum, String buildTime) {
Expand Down

0 comments on commit a3fefa5

Please sign in to comment.