commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <>
Subject RE: [Pool] Compiler Warnings/What's left for a release?
Date Tue, 22 Apr 2003 23:11:15 GMT
FYI, Here is the answer from the Eclipse mailing list that posted today:

-----Original Message-----
From: Olivier Thomann [] 
Sent: Tuesday, April 22, 2003 1:15 PM
Subject: RE: [jdt-dev] Read access to enclosing field is emulated by a syn
thetic accesso r method. Increasing its visibility will improve your per f

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.



-----Original Message-----
From: Gary Gregory [] 
Sent: Tuesday, April 22, 2003 11:14 AM
To: 'Jakarta Commons Developers List'
Subject: RE: [Pool] Compiler Warnings/What's left for a release?

Ah! That's one to ask to the eclipse/sun folks. :-) I have been pondering
this one myself. I can only suppose that emulation "by a synthetic accessor"
is slower than direct ivar access since there is an "extra" step...

I have posted a question on '' but got no answer. I just
asked again today... I'll let you know if an answer gets posted...


-----Original Message-----
From: Mohan Kishore [] 
Sent: Tuesday, April 22, 2003 10:51 AM
To: Jakarta Commons Developers List
Subject: RE: [Pool] Compiler Warnings/What's left for a release?

Couldn't really understand the warnings - how would increasing the
improve the performance?

--- Gary Gregory <> wrote:
> FYI,
> If you're an eclipse user (2.1 for me), you get the following compiler
> warnings. Changing the ivars from private to protected fixes these
> Kind	Status	Priority	Description	Resource	In Folder
> Location
> Warning			Write access to enclosing field
> GenericObjectPool._evictionCursor is emulated by a synthetic accessor
> method. Increasing its visibility will improve your performance
>	Apache Jakarta
> Commons/pool/src/java/org/apache/commons/pool/impl	line 1012

Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message