You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by billyboingo <bi...@gmail.com> on 2014/01/15 20:31:17 UTC
Re: DomainPermission.setTargets - bug?
andrewz wrote
> Looking at the source code of "DomainPermission.setTargets", I see a very
> strange lines of code:
>
> protected void setTargets(Set
> <String>
> targets) {
> this.targets = targets;
> if (this.targets != null && this.targets.equals(targets)) {
> return;
> }
> this.targets = targets;
> setParts(domain, actions, targets);
> }
>
>
> Note, that there're two similar lines:
>
> this.targets = targets;
>
> The first one of those shouldn't be there because it makes "equals"
> condition in next line to be always "true", which in turn prevents
> "setParts" method from being invoked and thus updating "parts" collection.
>
> Is this a known issue?
I was just bit by this today. I notice there haven't been any replies. Any
chance this will be fixed soon?
--
View this message in context: http://shiro-user.582556.n2.nabble.com/DomainPermission-setTargets-bug-tp7579366p7579509.html
Sent from the Shiro User mailing list archive at Nabble.com.
Re: DomainPermission.setTargets - bug?
Posted by Les Hazlewood <lh...@apache.org>.
I don't think this is a Jira issue for this - please create one.
Patches are very welcome! :)
--
Les Hazlewood | @lhazlewood
CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
On Wed, Jan 15, 2014 at 11:31 AM, billyboingo <bi...@gmail.com> wrote:
> andrewz wrote
>> Looking at the source code of "DomainPermission.setTargets", I see a very
>> strange lines of code:
>>
>> protected void setTargets(Set
>> <String>
>> targets) {
>> this.targets = targets;
>> if (this.targets != null && this.targets.equals(targets)) {
>> return;
>> }
>> this.targets = targets;
>> setParts(domain, actions, targets);
>> }
>>
>>
>> Note, that there're two similar lines:
>>
>> this.targets = targets;
>>
>> The first one of those shouldn't be there because it makes "equals"
>> condition in next line to be always "true", which in turn prevents
>> "setParts" method from being invoked and thus updating "parts" collection.
>>
>> Is this a known issue?
>
> I was just bit by this today. I notice there haven't been any replies. Any
> chance this will be fixed soon?
>
>
>
> --
> View this message in context: http://shiro-user.582556.n2.nabble.com/DomainPermission-setTargets-bug-tp7579366p7579509.html
> Sent from the Shiro User mailing list archive at Nabble.com.