You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2016/04/21 14:39:42 UTC

cxf git commit: Another update to JPACodeDataProvider

Repository: cxf
Updated Branches:
  refs/heads/master 39754b7da -> 13848329a


Another update to JPACodeDataProvider


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/13848329
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/13848329
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/13848329

Branch: refs/heads/master
Commit: 13848329ab5a2bfd4b3e5b7c2f83cc6a963e3f0a
Parents: 39754b7
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Thu Apr 21 13:39:24 2016 +0100
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Thu Apr 21 13:39:24 2016 +0100

----------------------------------------------------------------------
 .../cxf/rs/security/oauth2/grants/code/JPACodeDataProvider.java     | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/13848329/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProvider.java
index d6d759c..5766cd4 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JPACodeDataProvider.java
@@ -50,6 +50,7 @@ public class JPACodeDataProvider extends JPAOAuthDataProvider implements Authori
             if (sub == null) {
                 getEntityManager().persist(grant.getSubject());
             } else {
+                sub = getEntityManager().merge(grant.getSubject());
                 grant.setSubject(sub);
             }
         }