build error: sun/nio/ch/Util.java ?
David Holmes
david.holmes at oracle.com
Tue Oct 25 11:51:18 UTC 2011
On 25/10/2011 9:39 PM, Chris Hegarty wrote:
> On 10/25/11 12:26 PM, David Holmes wrote:
>>
>> 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.
Yep that's the scenario. I've actually seen lots of warnings doing
partial builds. I guess if we turn -Werror on everywhere they will all
be exposed.
Thanks,
David
>
> 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
More information about the core-libs-dev
mailing list