From: Markus KARG <markus@headcrashing.eu>
To: 'List' <pgsql-jdbc@postgresql.org>
Subject: Re: Pre-processing during build
Date: Wed, 17 Jun 2015 22:09:09 +0200
Message-ID: <002601d0a939$793152d0$6b93f870$@eu> (raw)
In-Reply-To: <b34d8608ae3b17cfb44f45774728e547@imap.procolix.com>
References: <000c01d0a7b6$97571ee0$c6055ca0$@eu>
<CADK3HHK9TUug9amtabv1a+27u_bb31FCsLBarWsPv_PD12JCcw@mail.gmail.com>
<CAB=Je-FC6NE7z=OMpfGRyOPk--Fw6Uci9iFbu+JQ1THfeuhgHA@mail.gmail.com>
<004b01d0a86a$4e9e6eb0$ebdb4c10$@eu>
<b34d8608ae3b17cfb44f45774728e547@imap.procolix.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
Mark,
the chapters you describe list explicitly the exceptions that can happen, and the causes. None of them covers "a class is referenced that has a non-referenced 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 test it agains the official javaee.jar, as that one not even contains ANY byte code but SOLELY declarations. And that one's an official JAR from the makers of Java!
Regards
-Markus
-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] 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" <markus@headcrashing.eu>
wrote:
> So it boils down to verification and I doubt that the bytecode
> verifier will try to actually load java.sql.Type class. Have you
> really tried
this
> out or do you have another link where it is written that the byte code
> verifier will CHECK the existence of a parameter class when it
> verifies
the
> loaded class?
It looks like the JLS and JVM specification allow for resolution of symbolic references at classloading or "first use" and a JVM implementation is free 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 available (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 changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: markus@headcrashing.eu
Subject: Re: Pre-processing during build
In-Reply-To: <002601d0a939$793152d0$6b93f870$@eu>
References: <000c01d0a7b6$97571ee0$c6055ca0$@eu> <CADK3HHK9TUug9amtabv1a+27u_bb31FCsLBarWsPv_PD12JCcw@mail.gmail.com> <CAB=Je-FC6NE7z=OMpfGRyOPk--Fw6Uci9iFbu+JQ1THfeuhgHA@mail.gmail.com> <004b01d0a86a$4e9e6eb0$ebdb4c10$@eu> <b34d8608ae3b17cfb44f45774728e547@imap.procolix.com> <002601d0a939$793152d0$6b93f870$@eu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox