Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z5TH7-00063F-Cq for pgsql-jdbc@arkaria.postgresql.org; Thu, 18 Jun 2015 06:26:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z5TH6-0001FY-5a for pgsql-jdbc@arkaria.postgresql.org; Thu, 18 Jun 2015 06:26:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z5TH4-0001FP-8u for pgsql-jdbc@postgresql.org; Thu, 18 Jun 2015 06:26:06 +0000 Received: from smtp.procolix.com ([95.215.185.30]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Z5TGp-0004HR-KU for pgsql-jdbc@postgresql.org; Thu, 18 Jun 2015 06:26:05 +0000 Received: from localhost (localhost [127.0.0.1]) by smtp.procolix.com (Postfix) with ESMTP id 138B443D84; Thu, 18 Jun 2015 08:25:50 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at smtp.procolix.com Received: from smtp.procolix.com ([127.0.0.1]) by localhost (host436.procolix.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h2W8qfecNiq9; Thu, 18 Jun 2015 08:25:30 +0200 (CEST) Received: from webmail.procolix.com (webmail.procolix.com [95.215.185.106]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mark@lawinegevaar.nl) by smtp.procolix.com (Postfix) with ESMTPSA id 5B27A43BFE; Thu, 18 Jun 2015 08:25:30 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Thu, 18 Jun 2015 08:25:30 +0200 From: Mark Rotteveel To: Markus KARG Cc: List Subject: Re: Pre-processing during build In-Reply-To: <002601d0a939$793152d0$6b93f870$@eu> References: <000c01d0a7b6$97571ee0$c6055ca0$@eu> <004b01d0a86a$4e9e6eb0$ebdb4c10$@eu> <002601d0a939$793152d0$6b93f870$@eu> Message-ID: <1522b76450babcc734cee195b99ccb1a@imap.procolix.com> X-Sender: mark@lawinegevaar.nl User-Agent: RoundCube Webmail/0.2 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On Wed, 17 Jun 2015 22:09:09 +0200, "Markus KARG" 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