syncope-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgrosso <...@git.apache.org>
Subject [GitHub] syncope pull request #70: [SYNCOPE-1301] fixed
Date Thu, 12 Apr 2018 14:25:38 GMT
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/70#discussion_r181100663
  
    --- Diff: core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAAccessTokenDAO.java
---
    @@ -115,6 +115,16 @@ public AccessToken save(final AccessToken accessToken) {
             return entityManager().merge(accessToken);
         }
     
    +    @Override
    +    public AccessToken replace(final AccessToken accessToken) {
    +        AccessToken existing = findByOwner(accessToken.getOwner());
    +        if (existing != null) {
    +            delete(existing.getKey());
    +        }
    +
    +        return entityManager().merge(accessToken);
    --- End diff --
    
    replace `entityManager().merge(accessToken)` with `save(accesToken)`


---

Mime
View raw message