RFR: [8054714] Use StringJoiner where it makes the code cleaner
Ivan Gerasimov
ivan.gerasimov at oracle.com
Sat Aug 9 06:00:39 UTC 2014
Thanks Joe!
I should have been more accurate with keeping the original delimiters.
Please find the updated webrev here:
http://cr.openjdk.java.net/~igerasim/8054714/1/webrev/
Sincerely yours,
Ivan
On 09.08.2014 5:38, Joe Darcy wrote:
> Hello,
>
> In src/share/classes/java/util/PropertyPermission.java, I believe the
> separator in
>
> 327 static String getActions(int mask) {
> 328 StringJoiner sj = new StringJoiner(", ");
>
> should be "," (a single comma) rather than ", " (a comma followed by a
> space).
>
> In src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java,
>
> 1390 StringJoiner cookieValue = new
> StringJoiner(", ");
>
> the separator used in the original code seems to be "; " rather than
> ", ".
>
> Cheers,
>
> -Joe
>
>
> On 08/08/2014 02:26 PM, Ivan Gerasimov wrote:
>> Hello everyone!
>>
>> This is a follower of the recently fixed [8051382] -- Optimize
>> java.lang.reflect.Modifier.toString().
>>
>> I found a dozen+ other places in jdk, where using the StringJoiner
>> makes the code shorter and cleaner.
>>
>> Would you please help review the fix?
>>
>> http://cr.openjdk.java.net/~igerasim/8054714/0/webrev/
>>
>> Sincerely yours,
>> Ivan
>
>
>
More information about the core-libs-dev
mailing list