Mark,
the chapters you describe list explicitly the exceptions that can happen, and the causes. None of them covers "a class
isreferenced 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-referencedmethods 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
thatone 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"
anda 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
includesa 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