Re: Pre-processing during build

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: Christopher BROWN <brown(at)reflexe(dot)fr>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Pre-processing during build
Date: 2015-06-18 12:38:08
Message-ID: CAB=Je-GHbA_4NtY=Lsm6QiZyn1r9KHyzA8mJjXJ0S0bqHX0-Dw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

>I see nothing wrong with implementing Driver using java.reflect.Proxy,

+1.

>PGDriver6 / PGDriver7 / PGDriver8 which could be compiled in steps

We can just compile all the drivers using JDK8 and -source 1.6 -target
1.6, can't we?
Well, step-by-step might be more robust, however it would require
careful setup of development environment (developers would have to
install different JDK versions and that is a high entry bar).

>I've not yet encountered any JVM that attempts to fully-resolve all signatures as soon as it loads a class. Does such a JVM exist?

JLS allows JVM to load classes at any point in time, however if JVM
decides to do early loading, it should not throw exceptions before
application code indeed tries to touch the "bad method".

http://www.excelsiorjet.com/ is a JVM that compiles java down to
native code. I guess they do a lot of resolutions at compile phase
(much more than OpenJDK does).

Here's the relevant JLS section:
https://docs.oracle.com/javase/specs/jls/se7/html/jls-12.html#jls-12.2.1
"... however, to reflect loading errors only at points in the program
where they could have arisen without prefetching or group loading"

Vladimir

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Christopher BROWN 2015-06-18 12:52:32 Re: Pre-processing during build
Previous Message Christopher BROWN 2015-06-18 12:27:18 Re: Pre-processing during build