harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5807) can't 'implement Delayed' compatibly with Sun Java
Date Wed, 07 May 2008 06:49:55 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594795#action_12594795
] 

Alexey Varlamov commented on HARMONY-5807:
------------------------------------------

Could not reproduce the problem neither with latest trunk build nor with M5 build, via plain
run of javac. The only difference with Sun jdk is that "-source 1.5" is not default and needed
to be specified explicitly:

C:\apache-dev\Harmony\trunk\working_vm>C:\apache-dev\harmony-jdk-629320\bin\javac.exe -source
1.5 -verbose DelayedImpl.java
[parsing    DelayedImpl.java - #1/1]
[reading    java/lang/Object.class]
[reading    java/lang/Comparable.class]
[analyzing  DelayedImpl.java - #1/1]
[writing    DelayedImpl.class - #1]
[writing    Comparable1.class - #2]
[writing    Delayed.class - #3]
[completed  DelayedImpl.java - #1/1]
[1 unit compiled]
[3 .class files generated]

C:\apache-dev\Harmony\trunk\working_vm>

I guess you're having problems with compilation via ant build? This can be an environment
issue, e.g. JAVA_HOME is set to other JDK or [boot]classpath is wrong, could you please look
around there?

> can't 'implement Delayed' compatibly with Sun Java
> --------------------------------------------------
>
>                 Key: HARMONY-5807
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5807
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>    Affects Versions: 5.0M5
>            Reporter: Doug Cutting
>
> In HADOOP-3262 I tried to get Hadoop to compile under Harmony, and ran into a problem.
> I can't find a way to get a class that 'implements Delayed' to compile in both Sun Java
and Harmony.
> Given:
> public interface Comparable<T> {
>   int compareTo(T o);
> }
> public interface Delayed extends Comparable<Delayed> {}
> What is the correct signature for compareTo() in a Delayed implementation.  Harmony requires
the first of the following methods, and doesn't mind the second, while Sun permits only the
second.
> public class DelayedImpl implements Delayed {
>   public int compareTo(Object o);
>   public int compareTo(Delayed o);
> }
> My guess is that Sun is correct and that this is a bug in Harmony.  Is that right?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message