Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 49406 invoked from network); 12 Feb 2008 15:49:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Feb 2008 15:49:43 -0000 Received: (qmail 67529 invoked by uid 500); 12 Feb 2008 15:49:35 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 67453 invoked by uid 500); 12 Feb 2008 15:49:35 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 67444 invoked by uid 99); 12 Feb 2008 15:49:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2008 07:49:35 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2008 15:48:48 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 73FB871406D for ; Tue, 12 Feb 2008 07:49:08 -0800 (PST) Message-ID: <1087560.1202831348473.JavaMail.jira@brutus> Date: Tue, 12 Feb 2008 07:49:08 -0800 (PST) From: "Gary Gregory (JIRA)" To: issues@commons.apache.org Subject: [jira] Created: (POOL-124) Access to enclosing constructor Foo.Bar() is emulated by a synthetic accessor method. Increasing its visibility will improve your performance. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Access to enclosing constructor Foo.Bar() is emulated by a synthetic accessor method. Increasing its visibility will improve your performance. ---------------------------------------------------------------------------------------------------------------------------------------------- Key: POOL-124 URL: https://issues.apache.org/jira/browse/POOL-124 Project: Commons Pool Issue Type: Improvement Affects Versions: 1.4 Environment: Eclipse Compiler 3.3M5. Reporter: Gary Gregory Fix For: 2.0 Fix compiler warnings like: {quote} Access to enclosing constructor GenericKeyedObjectPool.ObjectQueue() is emulated by a synthetic accessor method. Increasing its visibility will improve your performance." {quote} By definition, when a class element is private, it cannot be seen from outside the scope of the type that defines it. The compiler treats inner classes with some special processing though. Here is Olivier Thomann's explanation [1]: "You get this warning as soon as you access a private member (fields or methods) of the enclosing class inside an inner class (anonymous, local or member classes). The compiler uses a static access method to access the private member in order to workaround the VM access violation. You cannot access directly a private member from another class. From the VM point of view, an inner class is a different class and has no relation with its enclosing class. So doing this access to a private member you pay the price of a method invocation each time you access the member at runtime. This is not the case if the member is package visible." Gary [1] http://dev.eclipse.org/mhonarc/lists/jdt-dev/msg00145.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.