From dev-return-15424-archive-asf-public=cust-asf.ponee.io@syncope.apache.org Thu Apr 12 15:54:56 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B2963180634 for ; Thu, 12 Apr 2018 15:54:55 +0200 (CEST) Received: (qmail 55297 invoked by uid 500); 12 Apr 2018 13:54:54 -0000 Mailing-List: contact dev-help@syncope.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@syncope.apache.org Delivered-To: mailing list dev@syncope.apache.org Received: (qmail 55264 invoked by uid 99); 12 Apr 2018 13:54:54 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Apr 2018 13:54:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 02839E08A1; Thu, 12 Apr 2018 13:54:54 +0000 (UTC) From: ilgrosso To: dev@syncope.apache.org Reply-To: dev@syncope.apache.org References: In-Reply-To: Subject: [GitHub] syncope pull request #70: [SYNCOPE-1301] fixed Content-Type: text/plain Message-Id: <20180412135454.02839E08A1@git1-us-west.apache.org> Date: Thu, 12 Apr 2018 13:54:54 +0000 (UTC) Github user ilgrosso commented on a diff in the pull request: https://github.com/apache/syncope/pull/70#discussion_r181089640 --- Diff: core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/AccessTokenDataBinderImpl.java --- @@ -135,11 +135,7 @@ accessToken.setAuthorities(authorities); } - accessTokenDAO.save(accessToken); - } - - if (replaceExisting && existing != null) { - accessTokenDAO.delete(existing); + accessTokenDAO.merge(accessToken); --- End diff -- `replaceExisting` is an argument of `AccesstTokenDataBinderImpl#create` that your change would simply ignore. Not good: it must be checked. ---