This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I have a servlet which will initialize a static SecureRandom object then it will be used in doPost method to get a random byte for each http request. Is it thread safe for the nextBytes() method in this manner? Thanks. David
Looking at the source code, yes, the class appears to be thread safe. Unfortunately the authors did not bother to document this fact in the source. Also i didn't check the class thouroughly; it's possible some of the methods are not thread-safe. To be sure, you should really put in synchronization yourself I think. But you can probably get away without it if you want.