You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2022/09/29 15:39:30 UTC
[cxf] branch main updated: Fixing some PMD/checkstyle issues
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/main by this push:
new 5dab76961a Fixing some PMD/checkstyle issues
5dab76961a is described below
commit 5dab76961afaebd2e71aeeee9356a6878ee2e4f1
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Sep 29 16:39:12 2022 +0100
Fixing some PMD/checkstyle issues
---
.../security/oauth2/provider/AbstractOAuthDataProvider.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
index d4269c0485..cfc3d34996 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
@@ -99,7 +99,8 @@ public abstract class AbstractOAuthDataProvider implements OAuthDataProvider, Cl
return at;
}
- protected ServerAccessToken doCreateAccessToken(List<String> audiences,
+ //CHECKSTYLE:OFF
+ protected ServerAccessToken doCreateAccessToken(List<String> audiences, //NOPMD
Client client,
String clientCodeVerifier,
Map<String, String> extraProperties,
@@ -109,6 +110,7 @@ public abstract class AbstractOAuthDataProvider implements OAuthDataProvider, Cl
String responseType,
List<OAuthPermission> scopes,
UserSubject userSubject) {
+ //CHECKSTYLE:ON
ServerAccessToken at =
createNewAccessToken(client, userSubject);
@@ -423,8 +425,8 @@ public abstract class AbstractOAuthDataProvider implements OAuthDataProvider, Cl
List<OAuthPermission> theNewScopes = null;
if (restrictedScopes.isEmpty()) {
- theNewScopes = oldRefreshToken.getScopes() != null ?
- new ArrayList<OAuthPermission>(oldRefreshToken.getScopes()) : null;
+ theNewScopes = oldRefreshToken.getScopes() != null
+ ? new ArrayList<OAuthPermission>(oldRefreshToken.getScopes()) : null;
} else {
theNewScopes = convertScopeToPermissions(client, restrictedScopes);
if (!oldRefreshToken.getScopes().containsAll(theNewScopes)) {
@@ -434,8 +436,8 @@ public abstract class AbstractOAuthDataProvider implements OAuthDataProvider, Cl
ServerAccessToken at =
doCreateAccessToken(
- oldRefreshToken.getAudiences() != null ?
- new ArrayList<String>(oldRefreshToken.getAudiences()) : null,
+ oldRefreshToken.getAudiences() != null
+ ? new ArrayList<String>(oldRefreshToken.getAudiences()) : null,
client, oldRefreshToken.getClientCodeVerifier(),
oldRefreshToken.getExtraProperties(), oldRefreshToken.getGrantCode(),
oldRefreshToken.getGrantType(), oldRefreshToken.getNonce(),