Return-Path: Delivered-To: apmail-incubator-river-dev-archive@minotaur.apache.org Received: (qmail 25296 invoked from network); 5 Dec 2010 11:25:21 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Dec 2010 11:25:21 -0000 Received: (qmail 64993 invoked by uid 500); 5 Dec 2010 11:25:21 -0000 Delivered-To: apmail-incubator-river-dev-archive@incubator.apache.org Received: (qmail 64860 invoked by uid 500); 5 Dec 2010 11:25:20 -0000 Mailing-List: contact river-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: river-dev@incubator.apache.org Delivered-To: mailing list river-dev@incubator.apache.org Received: (qmail 64852 invoked by uid 99); 5 Dec 2010 11:25:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Dec 2010 11:25:20 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [83.163.196.105] (HELO nyx.xs4all.nl) (83.163.196.105) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Dec 2010 11:25:13 +0000 Received: from saturn.qcg.lan ([192.168.99.10]) by nyx.xs4all.nl with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1PPCi4-0007S2-Dx for river-dev@incubator.apache.org; Sun, 05 Dec 2010 12:24:52 +0100 Message-ID: <4CFB7683.7060005@qcg.nl> Date: Sun, 05 Dec 2010 12:24:51 +0100 From: Sim IJskes - QCG Organization: Quality Consultancy Group b.v. User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10 MIME-Version: 1.0 To: river-dev@incubator.apache.org Subject: Re: API and VM compatibility verification References: <4CFA658A.8000307@qcg.nl> <4CFAE9EB.1040300@zeus.net.au> In-Reply-To: <4CFAE9EB.1040300@zeus.net.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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