river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sim IJskes - QCG <...@qcg.nl>
Subject Re: API and VM compatibility verification
Date Sun, 05 Dec 2010 11:24:51 GMT
On 05-12-10 02:24, Peter Firmstone wrote:
> Sim IJskes - QCG wrote:
>> 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've been pondering bytecode analysis.

I think thats the only way to do it. Compile to jars and verify against 
API specs.

> We have just such a tool, have a look at in com.sun.jini.tool.classdepend
> It needs to be extended to include method signatures, currently it just

One minor detail. It only needs to be extended.

If we don't go for a complete tool, we need to make profiles. The 
profile should contain class version range (who knows where these are 
documented? jvms only lists until 1.2) method signatures and access 
modifiers. Whe can read the signatures from the (runtime) class files, 
the class version we specify manually.
To verify we would scan all the bytecode, look for method calls and 
verify existance and access.

We would basically recreate the bytecode verifier. I haven't reserarched 
how accessible it is in the tools.jar and how easy it would be to feed 
it profiles. I also haven't looked at harmony, which also should have a 
verifier.

I prefer a tool ready build. :-) Don't mind debugging it.

Gr. Sim


-- 
QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
Quality Consultancy Group b.v., Leiderdorp, Kvk Den Haag: 28088397

Mime
View raw message