Bug 46866 - Seed from current time is useless
Summary: Seed from current time is useless
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Catalina (show other bugs)
Version: unspecified
Hardware: Macintosh Mac OS X 10.3
: P2 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-16 21:34 UTC by Stepan Koltsov
Modified: 2009-04-07 12:26 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stepan Koltsov 2009-03-16 21:34:33 UTC
fgrep -r 'new Random(System.currentTimeMillis())' .

Gives 7 places where Random initialized with seed = currentTimeMillis. This is unnecessary, because better seed initialization happens in the default Random constructor.
Comment 1 Mark Thomas 2009-03-26 04:16:43 UTC
Thanks for the report.

This has been fixed in trunk and have been proposed for 6.0.x
Comment 2 Mark Thomas 2009-04-07 12:26:00 UTC
This has been applied to 6.0.x and will be included in 6.0.20 onwards.