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

Gabriele Kahlout gabriele at mysimpatico.com
Thu Feb 24 22:10:10 PST 2011


Awesome! Any reference to the bug and to the (first) version of the jdk
where this is fixed? Why wasn't this fixed against jdk6 versions too?

On Fri, Feb 25, 2011 at 2:05 AM, Jonathan Gibbons <
jonathan.gibbons at oracle.com> wrote:

>  Gabriele,
>
> Thank you.  Yes, I have recreated your problem, with javac version
> "1.6.0_20-b20", and agree it was a problem in javac after all. The good news
> is that the bug has been already been fixed in JDK 7.
>
> When I run your code with a recent build of JDK 7, this is the output I
> get:
>
> App.java:14: Note:
>     public void test() {
>                 ^
>   @SampleAnn()
>   public void test() {
>   }
>
>
> -- Jon
>
>
>
> On 02/24/2011 04:05 PM, Gabriele Kahlout wrote:
>
> 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
> /Users/simpatico/ws/PrintsSample/target/PrintsSample-1.0-SNAPSHOT.jar
> -processor InjectorProc App.java
> *null:0: o has private access in Private*
> App.java:14: Note:
> @SampleAnn()
> 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
> case?
> >>
> >> 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.
> >>>>
> >>>
> >>
> >>
> >
> >
>
>
>
> --
> Regards,
> 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 ∈
> L(-[a-z]+[0-9]X)).
>
>
>
>


-- 
Regards,
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 ∈
L(-[a-z]+[0-9]X)).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20110225/f3533659/attachment.html 


More information about the compiler-dev mailing list