Hello,
I've written a small shell script that compares the methods,
constructors and attributes (public,protected) of the Java official
API (from the official api specification in html format) to the GNU
classpath corespondent classes (from the source code of GCP).

The script doesn't handle (yet) correctly all the thrown exceptions
that it extracts from the html java documentation, but still the
output is quite usefull.

I made it to help me spot roughly the differences between the latest
java api and GNU classpath, and I think it may be usefull to some of
you also. See the examples bellow;

First of all, to make it work you should have flex (or lex) installed
on your system and change two variables from the toplevel of the
jdiff.sh file. These two variables are JAVADOC_API_ROOT and
CLASSPATH_ROOT (see the inline comments at the source for more
information).

A sample call of the program follows and some of the "bugs" are
displayed, note that "jdiff.sh -h" shows all the options and a brief
explanation.

####

jgeorgal@majestix:~$ jdiff.sh java.lang.String java.io.File

-------------------| java.lang.String |---------------------
| The lines marked with: (*) do not exist in GNU classpath
| The lines marked with: (!) do not exist in Java API

(!) publicintcompare(Object,Object)
(!) publicvoidgetBytes(int,int,byte,int)   | This is a bug. The programmer declared:
(*) publicvoidgetBytes(int,int,byte[],int) | ...,byte ID[],... if it was ...,byte[] 
ID,... it would work!
(!) publicvoidgetChars(int,int,char,int)   | The same here
(*) publicvoidgetChars(int,int,char[],int)
-------------------| java.io.File |---------------------
| The lines marked with: (*) do not exist in GNU classpath
| The lines marked with: (!) do not exist in Java API

(*) publicFile(URI)
(*) publicURItoURI()
(*) publicbooleancanRead() | Now, the bug I said before; it does not extract "some" 
Exceptions properly.
(!) publicbooleancanRead()SecurityException
<snip>

####

You can download the script (if you are interested) from:

http://majestix.ucnet.uoc.gr/~jgeorgal/pub/jdiff.sh
 
The program may introduce more bugs, for it is not extensively
tested. I can correct the alleged bugs if you find the script usefull
for the needs of GNU classpath. Take a look!

Please send to me or the list questions, comments and suggestions for
the program to make it more usefull.

Thank you,
Giannis

PS. Ofcourse you should have the Java API specification in html format
installed.
-- 
Is God willing to prevent evil, but not able? Then he is not omnipotent.
Is he able, but not willing? Then he is malevolent.
Is he both able and willing? Then whence cometh evil?
Is he neither able nor willing? Then why call him God?
(Epicurus)



_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to