Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F2FD3200B49 for ; Mon, 4 Jul 2016 10:56:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F1BF2160A6D; Mon, 4 Jul 2016 08:56:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4E5B8160A65 for ; Mon, 4 Jul 2016 10:56:12 +0200 (CEST) Received: (qmail 35396 invoked by uid 500); 4 Jul 2016 08:56:11 -0000 Mailing-List: contact dev-help@shiro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@shiro.apache.org Delivered-To: mailing list dev@shiro.apache.org Received: (qmail 35368 invoked by uid 99); 4 Jul 2016 08:56:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jul 2016 08:56:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 4D6A62C02A4 for ; Mon, 4 Jul 2016 08:56:11 +0000 (UTC) Date: Mon, 4 Jul 2016 08:56:11 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@shiro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SHIRO-480) setTarget method in DomainPermission does not set targets MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 04 Jul 2016 08:56:13 -0000 [ https://issues.apache.org/jira/browse/SHIRO-480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15361031#comment-15361031 ] ASF GitHub Bot commented on SHIRO-480: -------------------------------------- GitHub user ankon opened a pull request: https://github.com/apache/shiro/pull/22 SHIRO-480: Remove the wrong assignment to this.targets You can merge this pull request into a Git repository by running: $ git pull https://github.com/Collaborne/shiro issue/SHIRO-480 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/shiro/pull/22.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #22 ---- commit 546de0b7bfa41047c96ec5b8f7dbe0da671ceae6 Author: Andreas Kohn Date: 2015-10-09T10:03:14Z SHIRO-480: Remove the wrong assignment to this.targets ---- > setTarget method in DomainPermission does not set targets > --------------------------------------------------------- > > Key: SHIRO-480 > URL: https://issues.apache.org/jira/browse/SHIRO-480 > Project: Shiro > Issue Type: Bug > Components: Authorization (access control) > Affects Versions: 1.2.2 > Reporter: Bill Weiss > Priority: Minor > > The setTarget() method in org.apache.shiro.authz.permission.DomainPermission has an apparent typo, or copy paste error: > 133 protected void setTargets(Set targets) { > 134 this.targets = targets; > 135 if (this.targets != null && this.targets.equals(targets)) { > 136 return; > 137 } > 138 this.targets = targets; > 139 setParts(domain, actions, targets); > 140 } > As you can see, line 134 is a duplicate of line 138 and will in all cases, except where the argument targets is null, prevent execution from ever calling setParts() and functioning properly. > The work around for now is for classes extending DomainPermission to handle the call to setParts() directly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)