Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Is privileged aspect the default now? (was: Cannot access private field/method declared via ITD from target class)

On a side note: Whether I use a privileged aspect or not does not make
any difference. Besides, it never does seem to make any difference. Is
'privileged' the default now? It must have been for quite a while,
though.

-- 
Alexander Kriegisch
https://scrum-master.de


Alexander Kriegisch schrieb am 27.04.2020 08:10 (GMT +07:00):

> I might remember wrong, but I think this used to work at some point in
> the past, or at least it should. But before I file a Bugzilla ticket, I
> would like to have your opinion, Andy. Declaring something like
> 
> private int MyClass.myField = 0;
> 
> private int Account.getMyField() {
>  return myField;
> }
> 
> basically works and the aspect itself can access the field and the
> method. But the class they are declared on cannot and Ajc says:
> 
> [error] The method getMyField() from the type MyClass is not visible
> 
> For a full MCVE which you can just copy & paste and for my other
> findings, please see my answer here:
> 
> https://stackoverflow.com/a/61450184/1082681


Back to the top