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 2017/02/10 14:30:24 UTC
cxf-fediz git commit: Removing redundant type information
Repository: cxf-fediz
Updated Branches:
refs/heads/master 8f7cdf423 -> f0a8dd642
Removing redundant type information
Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/f0a8dd64
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/f0a8dd64
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/f0a8dd64
Branch: refs/heads/master
Commit: f0a8dd64230ffd212191d30c114503748b7bb43b
Parents: 8f7cdf4
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Fri Feb 10 14:30:01 2017 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Fri Feb 10 14:30:01 2017 +0000
----------------------------------------------------------------------
.../main/java/org/apache/cxf/fediz/core/config/Protocol.java | 2 +-
.../java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java | 2 +-
.../idp/protocols/TrustedIdpFacebookProtocolHandler.java | 2 +-
.../service/idp/protocols/TrustedIdpOIDCProtocolHandler.java | 4 ++--
.../fediz/service/oidc/clients/ClientRegistrationService.java | 6 +++---
5 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/f0a8dd64/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/Protocol.java
----------------------------------------------------------------------
diff --git a/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/Protocol.java b/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/Protocol.java
index 3eeaf54..993b011 100644
--- a/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/Protocol.java
+++ b/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/Protocol.java
@@ -181,7 +181,7 @@ public abstract class Protocol {
if (cbt.getType() == null || cbt.getType().equals(ArgumentType.STRING)) {
return cbt.getValue();
} else if (cbt.getType().equals(ArgumentType.CLASS)) {
- List<Object> handler = new ArrayList<Object>();
+ List<Object> handler = new ArrayList<>();
String[] cbtHandler = cbt.getValue().split(",");
for (String cbh : cbtHandler) {
try {
http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/f0a8dd64/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java
----------------------------------------------------------------------
diff --git a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java
index 9b9c5cd..1eaa135 100644
--- a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java
+++ b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java
@@ -34,7 +34,7 @@ public class IDPConfig extends Idp {
}
public void setTrustedIdps(Map<String, TrustedIDPConfig> trustedIdps) {
- this.trustedIdpList = new ArrayList<TrustedIdp>(trustedIdps.values());
+ this.trustedIdpList = new ArrayList<>(trustedIdps.values());
}
@Deprecated
http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/f0a8dd64/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpFacebookProtocolHandler.java
----------------------------------------------------------------------
diff --git a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpFacebookProtocolHandler.java b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpFacebookProtocolHandler.java
index 36db3ae..83444e5 100644
--- a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpFacebookProtocolHandler.java
+++ b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpFacebookProtocolHandler.java
@@ -156,7 +156,7 @@ public class TrustedIdpFacebookProtocolHandler extends AbstractTrustedIdpOAuth2P
private ClientAccessToken getAccessTokenUsingCode(String tokenEndpoint, String code, String clientId,
String clientSecret, String redirectURI) {
// Here we need to get the AccessToken using the authorization code
- List<Object> providers = new ArrayList<Object>();
+ List<Object> providers = new ArrayList<>();
providers.add(new OAuthJSONProvider());
WebClient client =
http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/f0a8dd64/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java
----------------------------------------------------------------------
diff --git a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java
index b45c763..47a318d 100644
--- a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java
+++ b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java
@@ -125,7 +125,7 @@ public class TrustedIdpOIDCProtocolHandler extends AbstractTrustedIdpOAuth2Proto
}
// Here we need to get the IdToken using the authorization code
- List<Object> providers = new ArrayList<Object>();
+ List<Object> providers = new ArrayList<>();
providers.add(new OAuthJSONProvider());
WebClient client =
@@ -284,7 +284,7 @@ public class TrustedIdpOIDCProtocolHandler extends AbstractTrustedIdpOAuth2Proto
&& jwt.getJwsHeaders().containsHeader(JoseConstants.HEADER_KEY_ID)) {
String kid = (String)jwt.getJwsHeaders().getHeader(JoseConstants.HEADER_KEY_ID);
LOG.debug("Attemping to retrieve key id {} from uri {}", kid, jwksUri);
- List<Object> jsonKeyProviders = new ArrayList<Object>();
+ List<Object> jsonKeyProviders = new ArrayList<>();
jsonKeyProviders.add(new JsonWebKeysProvider());
WebClient client =
http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/f0a8dd64/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
index fb60d98..3bdf1b9 100644
--- a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
+++ b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
@@ -193,7 +193,7 @@ public class ClientRegistrationService {
if (dataProvider instanceof AuthorizationCodeDataProvider) {
Client c = getRegisteredClient(id);
UserSubject subject = new OidcUserSubject(getUserName());
- List<ServerAuthorizationCodeGrant> codeGrants = new ArrayList<ServerAuthorizationCodeGrant>(
+ List<ServerAuthorizationCodeGrant> codeGrants = new ArrayList<>(
((AuthorizationCodeDataProvider)dataProvider).getCodeGrants(c, subject));
Collections.sort(codeGrants, new CodeGrantComparator());
return new ClientCodeGrants(c, codeGrants);
@@ -363,7 +363,7 @@ public class ClientRegistrationService {
String userName = newClient.getResourceOwnerSubject().getLogin();
Set<String> names = clientNames.get(userName);
if (names == null) {
- names = new HashSet<String>();
+ names = new HashSet<>();
clientNames.put(userName, names);
} else if (names.contains(newClient.getApplicationName())) {
String newName = newClient.getApplicationName();
@@ -419,7 +419,7 @@ public class ClientRegistrationService {
getClientRegistrations(userName).add(c);
Set<String> names = clientNames.get(userName);
if (names == null) {
- names = new HashSet<String>();
+ names = new HashSet<>();
clientNames.put(userName, names);
}
names.add(c.getApplicationName());