You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by "Loenko, Mikhail Y" <mi...@intel.com> on 2006/04/19 08:11:06 UTC
RE: [jira] Assigned: (HARMONY-376) [classlib][luni] Generics uplift for java.lang.String and java.util.Comparator
Hi Nathan
the patch breaks the build
compile:
[javac] Compiling 1639 source files to C:\harmony\build
[javac]
C:\harmony\modules\jndi\src\main\java\javax\naming\CompositeName.java:50
9: compareTo(java.lang.String) in java.lang.String cannot be applied to
(java.lang.Object)
[javac] r = ((String)
elems.get(i)).compareTo(he.elems.get(i));
[javac] ^
Thanks,
Mikhail
>-----Original Message-----
>From: Mikhail Loenko (JIRA) [mailto:jira@apache.org]
>Sent: Wednesday, April 19, 2006 12:37 PM
>To: harmony-commits@incubator.apache.org
>Subject: [jira] Assigned: (HARMONY-376) [classlib][luni] Generics
uplift for java.lang.String and
>java.util.Comparator
>
> [ http://issues.apache.org/jira/browse/HARMONY-376?page=all ]
>
>Mikhail Loenko reassigned HARMONY-376:
>--------------------------------------
>
> Assign To: Mikhail Loenko
>
>> [classlib][luni] Generics uplift for java.lang.String and
java.util.Comparator
>>
------------------------------------------------------------------------
------
>>
>> Key: HARMONY-376
>> URL: http://issues.apache.org/jira/browse/HARMONY-376
>> Project: Harmony
>> Type: Improvement
>
>> Components: Classlib
>> Reporter: Nathan Beyer
>> Assignee: Mikhail Loenko
>> Attachments: String_Comparator_generics_uplift.txt
>>
>> This issue is for adding the generic signatures to
java.util.Comparator, java.lang.String and a
>bit of clean up and updated test cases.
>
>--
>This message is automatically generated by JIRA.
>-
>If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
>-
>For more information on JIRA, see:
> http://www.atlassian.com/software/jira
---------------------------------------------------------------------
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
Re: [jira] Assigned: (HARMONY-376) [classlib][luni] Generics uplift for java.lang.String and java.util.Comparator
Posted by Mikhail Loenko <ml...@gmail.com>.
Hi Nathan
This test:
public class test {
public static void main(String[] args) throws Exception {
String s1 = "string 1";
Object o = s1;
System.out.println(s1.compareTo(o));
s1.compareTo(new Object());
}
}
once compiled with javac 1.4 runs the same way on all: RI 1.5, RI 1.4,
and Harmony. Though it can't be compiled on javac 1.5
So compatibility is OK in this case, thanks for the patch
Thanks,
Mikhail
2006/4/20, Nathan Beyer <nb...@kc.rr.com>:
> I posted another patch to fix the compile error in CompositeName, but is
> that the right thing to do? When I compiled the code against a RI Java 5 JRE
> library it still failed to compile in this scenario.
>
> The String class used to have two compareTo methods, but now it only has
> one, which seems like a non-passive change. This is a binary compatibility
> issue vs. a source compatibility issue? If this was compiled against the
> Java 1.4 libraries, it would still be binary compatible at runtime with a
> Java 5 library, but once the code is compile using Java 5 source, it's no
> longer compatible.
>
> -Nathan
>
>
>
> > -----Original Message-----
> > From: Loenko, Mikhail Y [mailto:mikhail.y.loenko@intel.com]
> > Sent: Wednesday, April 19, 2006 1:11 AM
> > To: harmony-dev@incubator.apache.org
> > Subject: RE: [jira] Assigned: (HARMONY-376) [classlib][luni] Generics
> > uplift for java.lang.String and java.util.Comparator
> >
> > Hi Nathan
> >
> > the patch breaks the build
> >
> > compile:
> > [javac] Compiling 1639 source files to C:\harmony\build
> > [javac]
> > C:\harmony\modules\jndi\src\main\java\javax\naming\CompositeName.java:50
> > 9: compareTo(java.lang.String) in java.lang.String cannot be applied to
> > (java.lang.Object)
> > [javac] r = ((String)
> > elems.get(i)).compareTo(he.elems.get(i));
> > [javac] ^
> >
> > Thanks,
> > Mikhail
> >
> >
> > >-----Original Message-----
> > >From: Mikhail Loenko (JIRA) [mailto:jira@apache.org]
> > >Sent: Wednesday, April 19, 2006 12:37 PM
> > >To: harmony-commits@incubator.apache.org
> > >Subject: [jira] Assigned: (HARMONY-376) [classlib][luni] Generics
> > uplift for java.lang.String and
> > >java.util.Comparator
> > >
> > > [ http://issues.apache.org/jira/browse/HARMONY-376?page=all ]
> > >
> > >Mikhail Loenko reassigned HARMONY-376:
> > >--------------------------------------
> > >
> > > Assign To: Mikhail Loenko
> > >
> > >> [classlib][luni] Generics uplift for java.lang.String and
> > java.util.Comparator
> > >>
> > ------------------------------------------------------------------------
> > ------
> > >>
> > >> Key: HARMONY-376
> > >> URL: http://issues.apache.org/jira/browse/HARMONY-376
> > >> Project: Harmony
> > >> Type: Improvement
> > >
> > >> Components: Classlib
> > >> Reporter: Nathan Beyer
> > >> Assignee: Mikhail Loenko
> > >> Attachments: String_Comparator_generics_uplift.txt
> > >>
> > >> This issue is for adding the generic signatures to
> > java.util.Comparator, java.lang.String and a
> > >bit of clean up and updated test cases.
> > >
> > >--
> > >This message is automatically generated by JIRA.
> > >-
> > >If you think it was sent incorrectly contact one of the administrators:
> > > http://issues.apache.org/jira/secure/Administrators.jspa
> > >-
> > >For more information on JIRA, see:
> > > http://www.atlassian.com/software/jira
> >
> > ---------------------------------------------------------------------
> > 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
>
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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
RE: [jira] Assigned: (HARMONY-376) [classlib][luni] Generics uplift for java.lang.String and java.util.Comparator
Posted by Nathan Beyer <nb...@kc.rr.com>.
I posted another patch to fix the compile error in CompositeName, but is
that the right thing to do? When I compiled the code against a RI Java 5 JRE
library it still failed to compile in this scenario.
The String class used to have two compareTo methods, but now it only has
one, which seems like a non-passive change. This is a binary compatibility
issue vs. a source compatibility issue? If this was compiled against the
Java 1.4 libraries, it would still be binary compatible at runtime with a
Java 5 library, but once the code is compile using Java 5 source, it's no
longer compatible.
-Nathan
> -----Original Message-----
> From: Loenko, Mikhail Y [mailto:mikhail.y.loenko@intel.com]
> Sent: Wednesday, April 19, 2006 1:11 AM
> To: harmony-dev@incubator.apache.org
> Subject: RE: [jira] Assigned: (HARMONY-376) [classlib][luni] Generics
> uplift for java.lang.String and java.util.Comparator
>
> Hi Nathan
>
> the patch breaks the build
>
> compile:
> [javac] Compiling 1639 source files to C:\harmony\build
> [javac]
> C:\harmony\modules\jndi\src\main\java\javax\naming\CompositeName.java:50
> 9: compareTo(java.lang.String) in java.lang.String cannot be applied to
> (java.lang.Object)
> [javac] r = ((String)
> elems.get(i)).compareTo(he.elems.get(i));
> [javac] ^
>
> Thanks,
> Mikhail
>
>
> >-----Original Message-----
> >From: Mikhail Loenko (JIRA) [mailto:jira@apache.org]
> >Sent: Wednesday, April 19, 2006 12:37 PM
> >To: harmony-commits@incubator.apache.org
> >Subject: [jira] Assigned: (HARMONY-376) [classlib][luni] Generics
> uplift for java.lang.String and
> >java.util.Comparator
> >
> > [ http://issues.apache.org/jira/browse/HARMONY-376?page=all ]
> >
> >Mikhail Loenko reassigned HARMONY-376:
> >--------------------------------------
> >
> > Assign To: Mikhail Loenko
> >
> >> [classlib][luni] Generics uplift for java.lang.String and
> java.util.Comparator
> >>
> ------------------------------------------------------------------------
> ------
> >>
> >> Key: HARMONY-376
> >> URL: http://issues.apache.org/jira/browse/HARMONY-376
> >> Project: Harmony
> >> Type: Improvement
> >
> >> Components: Classlib
> >> Reporter: Nathan Beyer
> >> Assignee: Mikhail Loenko
> >> Attachments: String_Comparator_generics_uplift.txt
> >>
> >> This issue is for adding the generic signatures to
> java.util.Comparator, java.lang.String and a
> >bit of clean up and updated test cases.
> >
> >--
> >This message is automatically generated by JIRA.
> >-
> >If you think it was sent incorrectly contact one of the administrators:
> > http://issues.apache.org/jira/secure/Administrators.jspa
> >-
> >For more information on JIRA, see:
> > http://www.atlassian.com/software/jira
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
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