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