Hi Henry, Can you please comment on the simplifications you did ?
Thanks,
Jim
On 04/18/2013 07:38 PM, Ulf Zibis wrote:
Am 18.04.2013 19:37, schrieb Jim Gish:
On 04/18/2013 08:49 AM, Ulf Zibis wrote:
Hi,
I'm wondering, that StringJoiner has some logic for pre/suffix, but
nothing to
Martin,
I've updated the toString() method as you suggested.
http://cr.openjdk.java.net/~jgish/Bugs-5015163-7172553/
http://cr.openjdk.java.net/%7Ejgish/Bugs-5015163-7172553/
Thanks,
Jim
On 04/18/2013 05:02 PM, Martin Buchholz wrote:
On Thu, Apr 18, 2013 at 10:34 AM, Jim Gish
On 17/04/2013 22:49, Jim Gish wrote:
Here's an update:
http://cr.openjdk.java.net/~jgish/Bugs-5015163-7172553/
http://cr.openjdk.java.net/%7Ejgish/Bugs-5015163-7172553/
Jim
StringJoiner looks much better now, good to see it reduced down to 2
simple constructors.
One thing that I didn't
Hi,
I don't think it's worth to add the braces at lines 2359..2360.
Please swap lines 2740 - 2739.
-Ulf
Am 18.04.2013 03:20, schrieb Roger Riggs:
Hi,
Can I suggest that the StringJoiner.toString() method explicitly append the
suffix
to the existing StringBuilder.
152 return
Hi,
I'm wondering, that StringJoiner has some logic for pre/suffix, but nothing to loop the elements
themselves :-(
To me, StringJoiner is a useless complicated box around StringBuilder, and imagine, someone needs
thread-safety.
It also slows down performance, as it needs additional
That was a nice idea, but you don't want to change the value when you do
toString(). Otherwise, if you subsequently add a new element, you're
hosed because you've already added on the suffix.
Jim
On 04/17/2013 09:20 PM, Roger Riggs wrote:
Hi,
Can I suggest that the StringJoiner.toString()
On 04/18/2013 08:49 AM, Ulf Zibis wrote:
Hi,
I'm wondering, that StringJoiner has some logic for pre/suffix, but
nothing to loop the elements themselves :-(
To me, StringJoiner is a useless complicated box around StringBuilder,
and imagine, someone needs thread-safety.
It also slows down
On Thu, Apr 18, 2013 at 10:34 AM, Jim Gish jim.g...@oracle.com wrote:
That was a nice idea, but you don't want to change the value when you do
toString(). Otherwise, if you subsequently add a new element, you're hosed
because you've already added on the suffix.
You can cheaply save the
Garbled javadoc:
41 * method will, by default, return {@code prefix+{@code suffix}}.
However, if
Thanks for catching that. I thought I fixed it. (In fact, I'm sure I
did in the latest rev).
On 04/18/2013 05:03 PM, Martin Buchholz wrote:
Garbled javadoc:
41 * method will, by default, return {@code prefix+{@code suffix}}.
However, if
--
Jim Gish | Consulting Member of
Am 18.04.2013 19:37, schrieb Jim Gish:
On 04/18/2013 08:49 AM, Ulf Zibis wrote:
Hi,
I'm wondering, that StringJoiner has some logic for pre/suffix, but nothing to loop the elements
themselves :-(
To me, StringJoiner is a useless complicated box around StringBuilder, and imagine, someone
I'm going to rip out the /li then. It's an unnecessary burden.
Thanks
Jim
On 04/16/2013 06:50 PM, Mike Duigou wrote:
On Apr 16 2013, at 08:50 , Alan Bateman wrote:
On 16/04/2013 16:13, Jim Gish wrote:
On 04/15/2013 02:02 PM, Martin Buchholz wrote:
You are fiddling with the javadoc for
String::
line 1253: This should use {@code } rather than code/code. I think regular
spaces are OK as well. nbsp; seems inappropriate.
lines 2425/2467: elements may not be null either.
I can tell you (or maybe it's just me) are itching to change :
for (CharSequence cs: elements) {
2477
Here's an update:
http://cr.openjdk.java.net/~jgish/Bugs-5015163-7172553/
http://cr.openjdk.java.net/%7Ejgish/Bugs-5015163-7172553/
Jim
On 04/17/2013 03:15 PM, Mike Duigou wrote:
String::
line 1253: This should use {@code } rather than code/code. I think regular
spaces are OK as well.
I'm still wondering about whether a joiner utility should support a prefix
and suffix. The obvious uses for this are collection class toString
methods, but we already know that we can and should implement those with a
single precise char[] construction, so should not use StringJoiner, or at
least
I'm open to this, but am interested in what others have to say,
especially as it relates to other lambda features coming in. Bear in
mind that this is at least the third major round of reviews for these
changes, the first round being a year ago on lambda-dev, when I first
submitted them, and
The motivation was indeed that it would support more efficient
Collection.toString. (But, I don't believe anything actually uses that
feature right now, other than tests.)
Even if *our* implementations were not to use this because we had a
better for-experts construction, I still think this
Hi,
Can I suggest that the StringJoiner.toString() method explicitly append
the suffix
to the existing StringBuilder.
152 return (value != null ? value.toString() + suffix : emptyValue);
Currently it will go to the trouble of creating a String from the
builder and then
To be concrete, here's a proposed toString method :
http://cr.openjdk.java.net/~martin/webrevs/openjdk8/toString/
which is pretty good as it stands, but even better once it gets to use the
no-copy String constructor.
If I don't get a chance to revisit the whole UUID optimization patch soon I
will see what I can do about breaking it up further and maybe just do the
no-copy String constructor by itself.
Mike
On Apr 17 2013, at 20:29 , Martin Buchholz wrote:
To be concrete, here's a proposed toString method
On 04/15/2013 02:02 PM, Martin Buchholz wrote:
You are fiddling with the javadoc for getChars, which is an
independent change. (I am also fiddling with getChars in another
ongoing change). I don't think closing html tags for li are
required in javadoc. If you are going to change the
On Apr 16 2013, at 08:50 , Alan Bateman wrote:
On 16/04/2013 16:13, Jim Gish wrote:
On 04/15/2013 02:02 PM, Martin Buchholz wrote:
You are fiddling with the javadoc for getChars, which is an independent
change. (I am also fiddling with getChars in another ongoing change). I
don't
On 12/04/2013 16:02, Alan Bateman wrote:
On 11/04/2013 23:33, Jim Gish wrote:
Please review
http://cr.openjdk.java.net/~jgish/Bugs-5015163-7175206-7172553/
http://cr.openjdk.java.net/%7Ejgish/Bugs-5015163-7175206-7172553/
These are changes that we made in lambda that we're now bringing into
You are fiddling with the javadoc for getChars, which is an independent
change. (I am also fiddling with getChars in another ongoing change). I
don't think closing html tags for li are required in javadoc. If you are
going to change the exception javadoc, then also change @exception to
@throws.
Is i+1 really preferred to i + 1 ? I thought it was the reverse, and
that i+1 was merely tolerated.
1570 if (value[i] == hi value[i+1] == lo) {
---
2425 * @throws NullPointerException If {@code delimiter} is {@code null}
you also throw NPE for element null, but you
It is natural to compare StringJoiner with guava Joiner.
http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/base/Joiner.html
Joiner is popular and has stood the test of time.
Joiner designers chose not to include a prefix and suffix, presumably
because that is an independent
On Mon, Apr 15, 2013 at 11:31 AM, Martin Buchholz marti...@google.comwrote:
OTOH, I'm guessing you are trying to improve the performance of operations
like List.toString.
More efficient (single copy char[]) would be to collect all the
sub-CharSequences in a CharSequence[], pre-compute the
On Apr 15, 2013, at 12:21 PM, Martin Buchholz marti...@google.com wrote:
On Mon, Apr 15, 2013 at 11:31 AM, Martin Buchholz marti...@google.comwrote:
OTOH, I'm guessing you are trying to improve the performance of operations
like List.toString.
More efficient (single copy char[]) would be
Thanks for the pointer. Yeah, that's one the pieces I think we should have
to do an optimal job of rewriting collection toString methods.
On Mon, Apr 15, 2013 at 1:03 PM, Steven Schlansker
stevenschlans...@gmail.com wrote:
On Apr 15, 2013, at 12:21 PM, Martin Buchholz marti...@google.com
On Apr 15 2013, at 13:03 , Steven Schlansker wrote:
On Apr 15, 2013, at 12:21 PM, Martin Buchholz marti...@google.com wrote:
On Mon, Apr 15, 2013 at 11:31 AM, Martin Buchholz marti...@google.comwrote:
OTOH, I'm guessing you are trying to improve the performance of operations
like
On 11/04/2013 23:33, Jim Gish wrote:
Please review
http://cr.openjdk.java.net/~jgish/Bugs-5015163-7175206-7172553/
http://cr.openjdk.java.net/%7Ejgish/Bugs-5015163-7175206-7172553/
These are changes that we made in lambda that we're now bringing into
JDK8.
I've made a couple of additions -
Please review
http://cr.openjdk.java.net/~jgish/Bugs-5015163-7175206-7172553/
http://cr.openjdk.java.net/%7Ejgish/Bugs-5015163-7175206-7172553/
These are changes that we made in lambda that we're now bringing into JDK8.
I've made a couple of additions - making StringJoiner final and adding a
32 matches
Mail list logo