Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/70#discussion_r181097338
  
    --- 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 --
    
    To me, it should be enough to pass the `replaceExisting` flag to the new 
`AccessTokenDAO#replace` method, and behave accordingly.


---

Reply via email to