harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko" <alexey.a.petre...@gmail.com>
Subject Re: [classlib] Sun compiler change?
Date Mon, 28 Aug 2006 06:08:59 GMT
2006/8/28, Spark Shen <smallsmallorgan@gmail.com>:
> Richard Liang 写道:
> >
> >
> > Richard Liang wrote:
> >>
> >>
> >> Nathan Beyer wrote:
> >>> Is anyone else using the latest Sun JDK, v5.0 Update 8 on Windows?
> >>>
> >>>
> >>>
> >>> I'm seeing a compilation error in the LUNI that I don't see with 5.0
> >>> Update
> >>> 7. Here's the error I'm getting.
> >>>
> >>>
> >>>
> >>> compile:
> >>>
> >>> [mkdir] Created dir:
> >>> C:\dev\harmony\enhanced\classlib\trunk\build\classes
> >>>
> >>> [javac] Compiling 3173 source files to
> >>> C:\dev\harmony\enhanced\classlib\trun
> >>>
> >>> k\build\classes
> >>>
> >>> [javac]
> >>> C:\dev\harmony\enhanced\classlib\trunk\modules\luni\src\main\java\ja
> >>>
> >>> va\util\MiniEnumSet.java:78: inconvertible types
> >>>
> >>> [javac] found : java.util.Collection<capture of ? extends E>
> >>>
> >>> [javac] required: java.util.EnumSet<E>
> >>>
> >>> [javac] EnumSet<E> set = (EnumSet<E>) collection;
> >>>
> >>> [javac] ^
> >>>
> >>>
> >> Yes, I got the same error using 1.5.0_08. Will have a look at it. :-)
> > This should be an enhancement/bug-fixing of java compiler. There are
> > bugs in java.util.MiniEnumSet. I will try to fix it later....
> Seems that in new version of JDK, EnumSet<E> and <capture of ? extends
> E> (E was previously stated as <E extends Enum<E>>) are not considered
> compatible.
> After changing
> EnumSet<E> set = (EnumSet<E>)collection;
> into
> EnumSet set = (EnumSet)collection;
> , compilation using ant in command line succeeds.
> Would any one give a clue, why the are considered incompatible in this
> version of JDK?
>
> Eclipse uses its own JDK compiler, which may differ from this 1.5.0_08
> version compiler.
Which IS differ :)

> I guess this is the reason why compilation only fails in command line on
> your machine.
>
> Best regards
> >
> > Richard.
> >>
> >> Best regards,
> >> Richard
> >>
> >>>
> >>>
> >>> When I compile in Eclipse 3.2 there's no error.
> >>>
> >>>
> >>>
> >>> -Nathan
> >>>
> >>>
> >>
> >
>
>
> --
> Spark Shen
> China Software Development Lab, IBM
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Alexey A. Petrenko
Intel Middleware Products Division
Mime
View raw message