Browse Source

Merge pull request #1410 from hausenism/master

fix bug #1397 Attempting to execute an operation on a closed EntityMa…
pull/1420/merge
Justin Richer 7 years ago committed by GitHub
parent
commit
a2e8cb1a67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      openid-connect-server/src/main/java/org/mitre/oauth2/repository/impl/JpaOAuth2TokenRepository.java

4
openid-connect-server/src/main/java/org/mitre/oauth2/repository/impl/JpaOAuth2TokenRepository.java

@ -190,7 +190,7 @@ public class JpaOAuth2TokenRepository implements OAuth2TokenRepository {
TypedQuery<OAuth2AccessTokenEntity> query = manager.createNamedQuery(OAuth2AccessTokenEntity.QUERY_BY_NAME, OAuth2AccessTokenEntity.class);
query.setParameter(OAuth2AccessTokenEntity.PARAM_NAME, name);
List<OAuth2AccessTokenEntity> results = query.getResultList();
return results != null ? new HashSet<>(query.getResultList()) : new HashSet<>();
return results != null ? new HashSet<>(results) : new HashSet<>();
}
@Override
@ -198,7 +198,7 @@ public class JpaOAuth2TokenRepository implements OAuth2TokenRepository {
TypedQuery<OAuth2RefreshTokenEntity> query = manager.createNamedQuery(OAuth2RefreshTokenEntity.QUERY_BY_NAME, OAuth2RefreshTokenEntity.class);
query.setParameter(OAuth2RefreshTokenEntity.PARAM_NAME, name);
List<OAuth2RefreshTokenEntity> results = query.getResultList();
return results != null ? new HashSet<>(query.getResultList()) : new HashSet<>();
return results != null ? new HashSet<>(results) : new HashSet<>();
}
@Override

Loading…
Cancel
Save