On 10/25/11 12:26 PM, David Holmes wrote:
On 25/10/2011 8:48 PM, Chris Hegarty wrote:
Hmmm... there was an issue in javac where it was not reporting raw type
warnings for anonymous inner classes. Maurizio fixed this recently
(javac will now report these warnings), but I did a clean build with
Maurizio's patch and all went well. I can also still do a clean build (
but I build just jdk not langtools, and use a b09 import ). Nightly
builds went fine too!

You can clearly see the raw type in the source, I just don't understand
why we didn't see if before. I'll file a CR and have it fixed.

I suspect this is another case of a partial build causing files to be
compiled with different settings. I'll try another clean build.

Yeap, kinda but officially the other way around ;-) A full build for me is ok, but when I clobber nio ('cd make/java/nio' 'make clobber') and rebuild just nio ('cd make/java/nio' 'make') I can see the problem. It looks like this class is being implicitly compiled earlier in the build process, and by a makefile without -Werror.

In fact, I see a few other warnings:

./../../src/share/classes/java/nio/charset/Charset.java:438: warning: [rawtypes] found raw type: Class
                        Class epc
                        ^
  missing type arguments for generic class Class<T>
  where T is a type-variable:
    T extends Object declared in class Class
error: warnings found and -Werror specified
../../../src/share/classes/sun/nio/ch/Util.java:366: warning: [rawtypes] found raw type: Class
                            new Class[] { int.class,
                                ^
  missing type arguments for generic class Class<T>
  where T is a type-variable:
    T extends Object declared in class Class
../../../src/share/classes/sun/nio/ch/Util.java:411: warning: [rawtypes] found raw type: Class
                            new Class[] { int.class,
                                ^
  missing type arguments for generic class Class<T>
  where T is a type-variable:
    T extends Object declared in class Class
1 error
3 warnings
make381: *** [.compile.classlist] Error 1

I'll file a CR and have this fixed.

-Chris.


Thanks,
David

-Chris

On 10/25/11 11:23 AM, David Holmes wrote:
I'm getting a build error due to -Werror and the fact that Util.java
uses a raw type: "new Class[] { ...}" and so generates a raw type
warning

David

Reply via email to