Where from "has private access in " is logged? I'd like to suppress it

Gabriele Kahlout gabriele at mysimpatico.com
Thu Feb 24 16:05:38 PST 2011

I've attached a sample project with a sample annotation processor. All it
does is empty the body of the method.
After building it I tested it with:

$ javac -cp
-processor InjectorProc App.java
*null:0: o has private access in Private*
App.java:14: Note:
public void test() {
    public void test() {
Gabriele-Kahlouts-MacBook:debug-print simpatico$

To get rid off the bold line comment Scope scope = trees.getScope(path); in
the annotation processor. Maybe not an issue. How about logging after the
annotation processing phase?

On Thu, Feb 24, 2011 at 11:45 PM, Jonathan Gibbons <
jonathan.gibbons at oracle.com> wrote:
> Gabriele,
> I think you need to investigate the annotation processors contained in
> dp4j-1.0-jar-with-dependencies.jar  for the source of your problem.  This
> (still) does not seem to be a javac issue.
> -- Jon
> On 02/24/2011 02:27 PM, Gabriele Kahlout wrote:
>> On Thu, Feb 24, 2011 at 11:11 PM, Jonathan Gibbons
>> <jonathan.gibbons at oracle.com>  wrote:
>>> Gabriele,
>>> You are not providing sufficient information to determine whether or not
>>> there is a javac issue.  Can you provide a simple reproducible test
>> It is (and was) in link [2]!  Or are you after a sample java project
>> that does dp4j on a single sample? I've a stripped down dp4j that
>> helped me identify the problem (to this level); I could strip it
>> further.
>> While I access trees.getScope(..) the JCTree passed contains invalid
>> access. At that point it doesn't seem to print anything yet (tracing
>> the source calls indeed don't seem to log anything). I'll then remove
>> the inaccessible access and replace it with reflection api accesible
>> access.  But when the code is compiled with javac the prints will
>> appear. Should they? Where do they read from? Not the CompilationUnit,
>> since once the annotation processor finished it's all accessible
>> compilable code.
>>> If not, we cannot help you.
>>> -- Jon
>>> On 02/24/2011 01:42 PM, Gabriele Kahlout wrote:
>>>> The bad news is that it seems javac uses it, not I (that indeed makes
>>>> sense). Please object if I'm misunderstanding.
>>>> NetBeans team: is there a quick option to suppress those from
>>>> NetBeans? The way to go is the scope as I described earlier, but if
>>>> supressing is readily available from NB it would be a good quick
>>>> option.
>>>> On Thu, Feb 24, 2011 at 8:35 PM, Gabriele Kahlout
>>>> <gabriele at mysimpatico.com>    wrote:
>>>>> The good news is that it's in tools.jar which I could modify and build
>>>>> against.

K. Gabriele

--- unchanged since 20/9/10 ---
P.S. If the subject contains "[LON]" or the addressee acknowledges the
receipt within 48 hours then I don't resend the email.
subject(this) ∈ L(LON*) ∨ ∃x. (x ∈ MyInbox ∧ Acknowledges(x, this) ∧ time(x)
< Now + 48h) ⇒ ¬resend(I, this).

If an email is sent by a sender that is not a trusted contact or the email
does not contain a valid code then the email is not received. A valid code
starts with a hyphen and ends with "X".
∀x. x ∈ MyInbox ⇒ from(x) ∈ MySafeSenderList ∨ (∃y. y ∈ subject(x) ∧ y ∈
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20110225/510c7725/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PrintsSample.zip
Type: application/zip
Size: 7974 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20110225/510c7725/PrintsSample.zip 

More information about the compiler-dev mailing list