RFR: 8013395 StringBuffer.toString performance regression impacting embedded benchmarks (original) (raw)
Peter Levart peter.levart at gmail.com
Mon May 13 22:34:05 UTC 2013
- Previous message: RFR: 8013395 StringBuffer.toString performance regression impacting embedded benchmarks
- Next message: Race in String.contentEquals ( was Re: RFR: 8013395 StringBuffer.toString performance regression impacting embedded benchmarks)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 05/14/2013 12:09 AM, Peter Levart wrote:
I noticed a synchronization bug in String.contentEquals method. If called with a StringBuffer argument while concurrent thread is modifying the StringBuffer, the method can either throw ArrayIndexOutOfBoundsException or return true even though the content of the StringBuffer has never been the same as the String's.
Here's a proposed patch: http://cr.openjdk.java.net/~plevart/jdk8-tl/String.contentEquals/webrev.01/ Regards, Peter
Or even better (with some code clean-up):
http://cr.openjdk.java.net/~plevart/jdk8-tl/String.contentEquals/webrev.02/
Regards, Peter
- Previous message: RFR: 8013395 StringBuffer.toString performance regression impacting embedded benchmarks
- Next message: Race in String.contentEquals ( was Re: RFR: 8013395 StringBuffer.toString performance regression impacting embedded benchmarks)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]