Code review request: 7077389 Reflection classes do not build with javac -Xlint:all -Werror

Rémi Forax forax at
Wed Aug 10 13:22:15 PDT 2011

On 08/10/2011 09:39 PM, Joe Darcy wrote:
> On 8/10/2011 11:36 AM, Alexandre Boulgakov wrote:
>> Hello Joe,
>> Could you please review these small changes to remove javac build 
>> warnings from the reflection classes?
>> Bug detail:
>> webrev: 
>> <>
>> I haven't updated the copyrights to avoid polluting the webrev.
>> I did not add JAVAC_WARNINGS_FATAL=true to the makefile because it is 
>> responsible for other packages which still have build warnings.
>> Thanks,
>> Sasha
> Hi Sasha.
> I approve the code changes with the following exceptions:
>     src/share/classes/sun/reflect/
> Offhand, I'm not sure of the semantics of this change.
> While adding serialVersionUIDs in sun/reflect/annotation/* is a good 
> change, I believe this interacts with another bug I'm working on so 
> please hold off on those changes for now.
> Thanks,
> -Joe

In AccessorGenerator:

   protected static final Class<?>[] primitiveTypes = new Class[] {

should be

   protected static final Class<?>[] primitiveTypes = new Class<?>[] {

in AnnotationParser:

   type.getClassLoader(), new Class[] { type },

should be

   type.getClassLoader(), new Class<?>[] { type },

in TypeVariableImpl:

   TypeVariable<? extends GenericDeclaration>  that =
                     (TypeVariable<? extends GenericDeclaration>) o;

should be
   TypeVariable<?>  that =  (TypeVariable<?>) o;

In GenericDeclRepository:

             TypeVariable<?>[] tps = new TypeVariable[ftps.length];

should be
             TypeVariable<?>[] tps = new TypeVariable<?>[ftps.length];

It seems that the compiler is not able to find a raw type
if it's the component type of an array.
(CC to compiler-dev)


More information about the compiler-dev mailing list