JDK 13 RFR of JDK-8217000: Refactor Class::methodToString

Stuart Marks stuart.marks at oracle.com
Tue Jan 15 23:19:42 UTC 2019



On 1/14/19 7:41 PM, Joe Darcy wrote:
> PS And for good measure, made analogous changes in Executable.java:
> 
>      http://cr.openjdk.java.net/~darcy/8217000.1/

Thanks for following up on this. Overall, looks good. One point:

  114             sb.append('(');
  115
  116             sb.append(Arrays.stream(parameterTypes)
  117                       .map(Type::getTypeName)
  118                       .collect(Collectors.joining(",")));
  119
  120             sb.append(')');

I think you can use the 3-arg form of joining() here, since the prefix and 
suffix are included even if the stream is empty.

s'marks


More information about the core-libs-dev mailing list