pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Rotteveel <mark@lawinegevaar.nl>
To: Markus KARG <markus@headcrashing.eu>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: Pre-processing during build
Date: Thu, 18 Jun 2015 08:25:30 +0200
Message-ID: <1522b76450babcc734cee195b99ccb1a@imap.procolix.com> (raw)
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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

On Wed, 17 Jun 2015 22:09:09 +0200, "Markus KARG" <markus@headcrashing.eu>
wrote:
> 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".

I think you fail to see the meaning of "resolution of symbolic references"
and the implications of JLS 12.3. A referenced class (be it in a method
signature or body) in the java code, has a symbolic reference (ie: a String
with type information, for simplicity: the fully qualified name) in the
bytecode. A JVM implementation can choose to resolve those to actual
classes at classloading time, or when it really needs it (eg if the method
is called). Depending on the specific JVM implementation, this means that a
class with a method that has a type in its signature that is not available
at runtime might either fail at classloading time or at runtime when - as
demonstrated by Vladimir - you enumerate the methods of the class using
reflection.

> 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!

Yes it does.

> 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!

Sorry, but that doesn't make any sense at all. The "official" JavaEE jar
does contain bytecode: interfaces and some supporting classes like
exceptions.

Mark


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (92+ messages)  latest in thread

Message-ID: <1522b76450babcc734cee195b99ccb1a@imap.procolix.com>
Permalink:  ../1522b76450babcc734cee195b99ccb1a@imap.procolix.com/
Also on:    postgresql.org/message-id/1522b76450babcc734cee195b99ccb1a@imap.procolix.com

 · 

reply

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: mark@lawinegevaar.nl, markus@headcrashing.eu
  Subject: Re: Pre-processing during build
  In-Reply-To: <1522b76450babcc734cee195b99ccb1a@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> <002601d0a939$793152d0$6b93f870$@eu> <1522b76450babcc734cee195b99ccb1a@imap.procolix.com>

* 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