Re: Pre-processing during build

From: Mark Rotteveel <mark(at)lawinegevaar(dot)nl>
To: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Pre-processing during build
Date: 2015-06-17 07:02:37
Message-ID: b34d8608ae3b17cfb44f45774728e547@imap.procolix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Tue, 16 Jun 2015 21:26:12 +0200, "Markus KARG" <markus(at)headcrashing(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Mark Rotteveel 2015-06-17 07:07:24 Re: Pre-processing during build
Previous Message Mark Rotteveel 2015-06-17 06:54:09 Re: Pre-processing during build