Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problem with static access to SimpleDateFormat #381

Merged
merged 1 commit into from Nov 2, 2018

Conversation

Projects
None yet
3 participants
@eryksz
Copy link

commented Sep 13, 2018

The BuildMemoryReport.TS_FORMAT is a static field of type java.text.DateFormat, which is not thread safe

As the JavaDoc states, DateFormats are inherently unsafe for multithreaded use. More on that plus the fix that I have used can be found here [1]

[1] https://stackoverflow.com/questions/4021151/java-dateformat-is-not-threadsafe-what-does-this-leads-to

@dpursehouse
Copy link
Contributor

left a comment

The change looks OK to me, but please fix the misspelling of SimpleDateFormat in the commit message.

Eryk Szymanski
Fix problem with static access to SimpleDateFormat
The BuildMemoryReport.TS_FORMAT is a static field of type
java.text.DateFormat, which isn't thread safe

As the JavaDoc states, DateFormats are inherently unsafe for
multithreaded use. More on that plus fix can be found here:[1]

[1]https://stackoverflow.com/questions/4021151/java-dateformat-is-not-threadsafe-what-does-this-leads-to

@eryksz eryksz force-pushed the eryksz:fix_SimpleDateFormat branch from 62ee756 to 4c283c6 Sep 14, 2018

@eryksz eryksz changed the title Fix problem with static access to SimpeDateFormat Fix problem with static access to SimpleDateFormat Sep 14, 2018

@rsandell rsandell merged commit d7a303c into jenkinsci:master Nov 2, 2018

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.