Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z5TMN-0006Gz-0P for pgsql-jdbc@arkaria.postgresql.org; Thu, 18 Jun 2015 06:31:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z5TML-0001zN-Vv for pgsql-jdbc@arkaria.postgresql.org; Thu, 18 Jun 2015 06:31:34 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z5TMK-0001zD-UD for pgsql-jdbc@postgresql.org; Thu, 18 Jun 2015 06:31:33 +0000 Received: from smtp.procolix.com ([95.215.185.30]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Z5TMD-0002zm-CL for pgsql-jdbc@postgresql.org; Thu, 18 Jun 2015 06:31:31 +0000 Received: from localhost (localhost [127.0.0.1]) by smtp.procolix.com (Postfix) with ESMTP id 777CF43D84 for ; Thu, 18 Jun 2015 08:31:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at smtp.procolix.com Received: from smtp.procolix.com ([127.0.0.1]) by localhost (host436.procolix.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EdHRAvJ8FGFW for ; Thu, 18 Jun 2015 08:31:22 +0200 (CEST) Received: from webmail.procolix.com (webmail.procolix.com [95.215.185.106]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mark@lawinegevaar.nl) by smtp.procolix.com (Postfix) with ESMTPSA id 6641843BFE for ; Thu, 18 Jun 2015 08:31:22 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Thu, 18 Jun 2015 08:31:22 +0200 From: Mark Rotteveel To: Subject: Re: Pre-processing during build In-Reply-To: <002c01d0a93e$d00bb8c0$70232a40$@eu> References: <000c01d0a7b6$97571ee0$c6055ca0$@eu> <823ac781b677cc2d56a111712d44f682@imap.procolix.com> <006801d0a86b$9cdf95d0$d69ec170$@eu> <002c01d0a93e$d00bb8c0$70232a40$@eu> Message-ID: X-Sender: mark@lawinegevaar.nl User-Agent: RoundCube Webmail/0.2 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On Wed, 17 Jun 2015 22:47:23 +0200, "Markus KARG" wrote: > Sorry but you're wrong here. > > Vladimir's example was invalid. See > https://gist.github.com/mkarg/88a89ae0dbffcfb7543e instead. > > Resolution will not fail. Even early static resolution won't. Check again > the chapter of JLS about the critera to throw the listed exceptions. None > of them is met with the corrected example > https://gist.github.com/mkarg/88a89ae0dbffcfb7543e. > > The direct example will NOT fail on Java 7 as the method is not changed, > but added. The original method is still in place. Both methods exist at the > same time and differ by signature, hence the linker of the old program > finds the old method in the new class. No problem at all. > > The indirect example will NOT fail on Java 7 as a JRE 7 client will never > pass in an instance of a JRE 8 type (how should even know of its > existence?), and the Java 6 machine executing the invoked method will never > INSTANTIATE that type so it will not fail. No problem at all. > > Still should work. You'd possibly like to set up a proof using the > corrected example https://gist.github.com/mkarg/88a89ae0dbffcfb7543e. :-) Sorry, but you're the one that is wrong, it is not only about actually calling methods with types, it is about the presence or absence of those types when the JVM does decide to resolve the symbolic reference (eg when you reflect the declared methods). I am about done with this discussion. I think the onus is on you to prove this scheme will work, not for us to prove it won't work (which we already did). Your prove should not only include simple direct instance access, but also when using reflection **which is very common with JDBC drivers** (eg connection pools, tools/libraries that bridge differences in JDBC implementations, etc). It sounds like you want to trade minor complexity in the build/IDE process for a world of hurt for the users of your driver. I don't think that is a good way forward. Mark -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc