harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stuart Ballard" <stuart.a.ball...@gmail.com>
Subject Re: [Japi] [general] interesting discoveries with japitools - part 2
Date Wed, 08 Nov 2006 03:01:24 GMT
On 11/7/06, Stefano Mazzocchi <stefano@apache.org> wrote:
> java.awt.peer:
> Missing
> method java.awt.peer.WindowPeer.updateFocusableWindowState(): missing in
> bea1.5

This one indicates that your set of packages is not correct:
java.awt.peer is not a documented package. Unfortunately getting the
right set of packages is hard on Windows - I just posted on
japitools-list about improving that situation. If you do happen to be
on a unix-like system this should work:

japiextractpkgs docs/api/overview-frame.html >jdk15.pkgs
japize as jdk15 packages jre/lib/*.jar `cat jdk15.pkgs`

where "docs/api" is a folder containing the JDK javadocs.

The trouble is that the "backquote" quoting and the cat command aren't
available on Windows and I'm not aware of an alternative. So the plan
is to get Japize to accept "@jdk15.pkgs" as an alternative syntax. Any
volunteers or anyone who knows where I could find code to do that,
dealing with quoting and the like, under a GPL-compatible license,
please speak up on japitools-list...

> java.util.concurrent:
> Abs.add
> method java.util.concurrent.Delayed.compareTo(java.lang.Object): new
> interface method in bea1.5
>
>
> So, it appears that that Sun added a method that is not available in the
> javadocs (bad Sun, no donut for you!) and that BEA did not (correctly)
> implement.
>
> Also, BEA added the method "compareTo" to the
> java.util.concurrent.Delayed interface. This is not really a problem
> because Delayed extends Comparable, therefore all classes implementing
> Delayed will have to have the compareTo method anyway.

Comparable is really fun in the presence of generics. Does Delayed
implement Comparable or Comparable<Delayed> or Comparable<? extends
Delayed> or what?

If it implements Comparable<Delayed> then it *doesn't* technically
have a compareTo(Object) method but a compareTo(Delayed) instead. If
Sun added a compareTo(Object) method as well... well that'd have some
rather weird effects. I'll need to take a while to get my head round
that. Could you produce and send me Japi files of *just* the Delayed
class in both implementations so I can look at the differences in
detail?

> Stuart, do you think this is something that japitools should check?
>
> I would call this a false positive.

I think it's an indicator of something, I'd say more investigation is
needed before determining it's a Japitools bug.

> java.awt.peer:
> Missing
> method java.awt.peer.WindowPeer.updateFocusableWindowState(): missing in
> ibm1.5

Again peer should not be included.

> java.util.concurrent:
> Abs.add
> method java.util.concurrent.Delayed.compareTo(java.lang.Object): new
> interface method in ibm1.5

Same as above.

> javax.xml.datatype:
> Bad
> field
> javax.xml.datatype.DatatypeFactory.DATATYPEFACTORY_IMPLEMENTATION_CLASS:
> constant
> [com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl]
> in sun1.5, but constant
> [org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl] in ibm1.5

This is an API bug on Sun's part; alternative implementers are screwed
here either way. Constant fields are inlined so the value will be
taken from the implementation the code was *compiled* against, not
what it's running against. Japitools is correct to report this as an
error, but the only *correct* fix is for Sun to un-constify that
field.

> java.util.concurrent:
> Abs.add
> method java.util.concurrent.Delayed.compareTo(java.lang.Object): new
> interface method in sun1.5
> Done.
>
> Hmmm, the compareTo is in both the direct and the reverse? smells like a
> japitool bug to me.

Yes that is odd. Please do send me those two Japi files.

> java.lang:
> Missing
> method java.lang.StringBuilder.append(java.lang.StringBuilder): missing
> in sun1.5

Weird.

>  2) package org.w3c.dom.xpath: missing in sun1.5

This again is a "not getting the right set of packages" issue. Adding
extra packages isn't illegal (at least not in Japitools's view of the
world); the comparisons should be done based on which packages are
*documented* as present.

> The results show clearly that japitools did indeed improve a lot over
> the last released version.

Great :)

> NOTE: the results were taken with the following package passed to the
> "japize" tool:
>
>  +java +javax +org -org.apache -org.ietf

Yup, that's your trouble ;)

Stuart.
-- 
http://sab39.dev.netreach.com/

Mime
View raw message