Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z5Je1-0000We-QO for pgsql-jdbc@arkaria.postgresql.org; Wed, 17 Jun 2015 20:09:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z5Je1-0000dR-9w for pgsql-jdbc@arkaria.postgresql.org; Wed, 17 Jun 2015 20:09:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z5Jdz-0000bS-S0 for pgsql-jdbc@postgresql.org; Wed, 17 Jun 2015 20:09:07 +0000 Received: from smtprelay03.ispgateway.de ([80.67.31.30]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Z5Jdw-00016L-7k for pgsql-jdbc@postgresql.org; Wed, 17 Jun 2015 20:09:07 +0000 Received: from [88.66.14.101] (helo=Zauselmaus) by smtprelay03.ispgateway.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84) (envelope-from ) id 1Z5JdH-0007U9-D4 for pgsql-jdbc@postgresql.org; Wed, 17 Jun 2015 22:08:23 +0200 From: "Markus KARG" To: "'List'" References: <000c01d0a7b6$97571ee0$c6055ca0$@eu> <004b01d0a86a$4e9e6eb0$ebdb4c10$@eu> In-Reply-To: Subject: Re: Pre-processing during build Date: Wed, 17 Jun 2015 22:09:09 +0200 Organization: Markus KARG, Staatl. gepr. Inf. Message-ID: <002601d0a939$793152d0$6b93f870$@eu> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdCoy7RFOfGRCAFXRI65JWF6q2F2KwAYXPkA Content-Language: de X-AVK-Virus-Check: AVA 25.1869;71FD75 X-AVK-Spam-Check: 1; str=0001.0A0C0201.5581D3DE.00BB,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0; F1206 X-Df-Sender: bWFya3VzQGhlYWRjcmFzaGluZy5ldQ== X-Pg-Spam-Score: -2.6 (--) 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 Mark, the chapters you describe list explicitly the exceptions that can happen, a= nd the causes. None of them covers "a class is referenced that has a non-re= ferenced method that has a non-existent class". Even with early resolution, the JLS does not cover the case we have, which = is containing non-existent classes in non-referenced methods of referenced = classes! The devil's in the details, right? ;-) Hence we're still safe. If that won't work, nobody could write a Java EE program and compile and te= st it agains the official javaee.jar, as that one not even contains ANY byt= e code but SOLELY declarations. And that one's an official JAR from the mak= ers of Java! Regards -Markus -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.o= rg] On Behalf Of Mark Rotteveel Sent: Mittwoch, 17. Juni 2015 09:03 To: List Subject: Re: [JDBC] Pre-processing during build On Tue, 16 Jun 2015 21:26:12 +0200, "Markus KARG" wrote: > So it boils down to verification and I doubt that the bytecode=20 > verifier will try to actually load java.sql.Type class. Have you=20 > really tried this > out or do you have another link where it is written that the byte code=20 > verifier will CHECK the existence of a parameter class when it=20 > verifies the > loaded class? It looks like the JLS and JVM specification allow for resolution of symboli= c references at classloading or "first use" and a JVM implementation is fre= e to choose: see http://docs.oracle.com/javase/specs/jls/se8/html/jls-12.html#jls-12.1.2 and http://docs.oracle.com/javase/specs/jls/se8/html/jls-12.html#jls-12.3 Although I am not entirely sure about this, I interpret this that loading a= class that has a method whose signature includes a type that is not availa= ble (like SQLType on Java 7 or lower) could work on one JVM implementation = (late resolution), but not on others (early resolution). Mark -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make change= s to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc --=20 Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc