Code review request for 6298888 (reflect) Add toGenericString to java.lang.Class and java.lang.reflect.Type

Peter Levart peter.levart at gmail.com
Wed Apr 3 08:26:42 UTC 2013


Hi Joe,

Why not using StringBuilder instead of StringBuffer in 
Class.toGenericString ?

Regards, Peter

On 04/03/2013 09:27 AM, Joe Darcy wrote:
> Hello,
>
> This is combined code review request for
>
>     6298888 (reflect) Add toGenericString to java.lang.Class and 
> getTypeName to java.lang.reflect.Type
>     6992705 (reflect) Include modifiers to Class's toGenericString()
>     http://cr.openjdk.java.net/~darcy/6298888.0/
>
> In brief, a "toGenericString" method is added to java.lang.Class, 
> analogous to the toGenericString methods in Field, Method, and 
> Constructor. A default method for "getTypeName" is added to 
> java.lang.reflect Type, which allows the code used to implement 
> toGenericString to be cleaned up.
>
> There is some general maintenance on this area as well. In particular, 
> the correct specification change intended to be done as part of
>
>     8004979: java.lang.reflect.Modifier.toString should include "default"
>     http://hg.openjdk.java.net/jdk8/tl/jdk/rev/b4f68aca1000
>
> is included; the "default" modifier should appear after "abstract" and 
> not at the very end of the modifier list.
>
> Thanks,
>
> -Joe




More information about the core-libs-dev mailing list