Re: RFR: 8153666: Optimize Formatter.formatMessage

2016-06-08 Thread Martin Buchholz
Thanks, Daniel. I only gave it a quick look, but Looks Good To Me.

Re: RFR: 8153666: Optimize Formatter.formatMessage

2016-06-08 Thread Daniel Fuchs
Thanks Roger. Here is an updated webrev: http://cr.openjdk.java.net/~dfuchs/webrev_8153666/webrev.01 best regards, -- daniel On 08/06/16 15:56, Roger Riggs wrote: +1 On 6/8/2016 10:37 AM, Daniel Fuchs wrote: On 08/06/16 15:35, Roger Riggs wrote: Yes, I would update the spec to the new b

Re: RFR: 8153666: Optimize Formatter.formatMessage

2016-06-08 Thread Roger Riggs
Looks good, Thanks, Roger On 6/8/2016 11:47 AM, Daniel Fuchs wrote: Thanks Roger. Here is an updated webrev: http://cr.openjdk.java.net/~dfuchs/webrev_8153666/webrev.01 best regards, -- daniel On 08/06/16 15:56, Roger Riggs wrote: +1 On 6/8/2016 10:37 AM, Daniel Fuchs wrote: On 08/06

Re: RFR: 8153666: Optimize Formatter.formatMessage

2016-06-08 Thread Daniel Fuchs
Thanks Roger. Here is an updated webrev: http://cr.openjdk.java.net/~dfuchs/webrev_8153666/webrev.01 best regards, -- daniel On 08/06/16 15:56, Roger Riggs wrote: +1 On 6/8/2016 10:37 AM, Daniel Fuchs wrote: On 08/06/16 15:35, Roger Riggs wrote: Yes, I would update the spec to the new b

Re: RFR: 8153666: Optimize Formatter.formatMessage

2016-06-08 Thread Roger Riggs
+1 On 6/8/2016 10:37 AM, Daniel Fuchs wrote: On 08/06/16 15:35, Roger Riggs wrote: Yes, I would update the spec to the new behavior. What about: * Otherwise, if the string contains {@code "{"} * where {@code } is in {@code [0-9]} * then java.text.MessageFormat is used

Re: RFR: 8153666: Optimize Formatter.formatMessage

2016-06-08 Thread Daniel Fuchs
On 08/06/16 15:35, Roger Riggs wrote: Yes, I would update the spec to the new behavior. What about: * Otherwise, if the string contains {@code "{"} * where {@code } is in {@code [0-9]} * then java.text.MessageFormat is used to format the string. -- daniel On 6/8/20

Re: RFR: 8153666: Optimize Formatter.formatMessage

2016-06-08 Thread Roger Riggs
Yes, I would update the spec to the new behavior. On 6/8/2016 10:31 AM, Daniel Fuchs wrote: Good point Roger! I was already wondering whether looking for {[0-9] instead of {[0-3] deserved a small mention in the release note. The fact that the spec needs updating confirms that this little beh

Re: RFR: 8153666: Optimize Formatter.formatMessage

2016-06-08 Thread Daniel Fuchs
Good point Roger! I was already wondering whether looking for {[0-9] instead of {[0-3] deserved a small mention in the release note. The fact that the spec needs updating confirms that this little behavior change probably needs to be mentioned. I will do the paperwork for the spec change. I do

Re: RFR: 8153666: Optimize Formatter.formatMessage

2016-06-08 Thread Roger Riggs
Hi Daniel, Looks ok, but... Formatter.java: - line 104: the javadoc says it looks for '{0' but the implementation looks for '{'[0..9] It looks like the spec is out of sync with the implementation (the implementation is more lenient) and has been for a while. According to the spec/jav

RFR: 8153666: Optimize Formatter.formatMessage

2016-06-08 Thread Daniel Fuchs
Hi, Please find below a patch for a small optimization in Formatter.formatMessage. This patch also removed the synchronized keyword which was there for historical reasons - but which has become needless. More background available at: https://bugs.openjdk.java.net/browse/JDK-8153666 (thanks Marti