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

Florian Weimer fweimer at redhat.com
Tue Jan 15 11:59:28 UTC 2019


* Joe Darcy:

> - sb.append(Stream.of(typeparms).map(Class::typeVarBounds).
> -                          collect(Collectors.joining(",", "<", ">")));
> +                sb.append(Arrays.stream(typeparms)
> +                          .map(Class::typeVarBounds)
> +                          .collect(Collectors.joining(",", "<", ">")));
>              }

I realize that this is a pre-existing issue, but isn't this approach a
bit awkward?  Creating a temporary string just to put it into a
StringBuilder?

Thanks,
Florian


More information about the core-libs-dev mailing list