river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wade Chandler <hwadechandler-apa...@yahoo.com>
Subject Re: API and VM compatibility verification
Date Sat, 04 Dec 2010 19:54:29 GMT
----- Original Message ----

> From: Sim IJskes - QCG <sim@qcg.nl>
> To: "river-dev@incubator.apache.org" <river-dev@incubator.apache.org>
> Sent: Sat, December 4, 2010 11:00:10 AM
> Subject: API and VM compatibility verification
> Hello,
> Is there a tool that we can use to verify API compatibility? So we  can make 
>sure we do not call methods that do not exist?

I don't really know of any. One way would be to run binary tests against 
different JREs/JDKs. Compile with the desired JDK. Then run other things with 
the target. Depending on code coverage of the tests that would be very useful.

There are things like BigDecimal with its constructors BigDecimal(int) and 1.4.2 
not having that. When you compile source code passing an int into a BigDecimal 
constructor with 1.5+ it references that particular method signature. That will 
then not run in binary form in a 1.4.2 VM, but compiling that logic in 1.4.2 
will work in 1.5 because the int winds up expanded to the BigDecimal(double) 
call at compile time. So, without a run through of the binary logic I don't 
think a tool could just scan the sources and insure compatibility unless it 
overlooked compile time expansion as in this case and strictly looked for method 
signatures. Either way, I don't know of any tooling.


Wade Chandler
Software Engineer and Developer
NetBeans Dream Team Member and Contributor


View raw message