From c0ebd786e3bf0ce1731da797258b6fe1c2349f80 Mon Sep 17 00:00:00 2001 From: Andrei Arlou Date: Sat, 23 Nov 2019 00:43:02 +0300 Subject: [PATCH] KEYCLOAK-12208 Use diamond operator for collections in package "org.keycloak.dom.saml.v2.metadata" from module "saml-core-api" --- .../saml/v2/metadata/AffiliationDescriptorType.java | 4 ++-- .../v2/metadata/AttributeAuthorityDescriptorType.java | 10 +++++----- .../v2/metadata/AttributeConsumingServiceType.java | 6 +++--- .../saml/v2/metadata/AuthnAuthorityDescriptorType.java | 6 +++--- .../org/keycloak/dom/saml/v2/metadata/ContactType.java | 4 ++-- .../keycloak/dom/saml/v2/metadata/EndpointType.java | 2 +- .../dom/saml/v2/metadata/EntitiesDescriptorType.java | 2 +- .../dom/saml/v2/metadata/EntityDescriptorType.java | 8 ++++---- .../keycloak/dom/saml/v2/metadata/ExtensionsType.java | 2 +- .../dom/saml/v2/metadata/IDPSSODescriptorType.java | 10 +++++----- .../dom/saml/v2/metadata/KeyDescriptorType.java | 2 +- .../dom/saml/v2/metadata/OrganizationType.java | 6 +++--- .../dom/saml/v2/metadata/PDPDescriptorType.java | 6 +++--- .../dom/saml/v2/metadata/RoleDescriptorType.java | 6 +++--- .../dom/saml/v2/metadata/SPSSODescriptorType.java | 4 ++-- .../dom/saml/v2/metadata/SSODescriptorType.java | 8 ++++---- .../dom/saml/v2/metadata/TypeWithOtherAttributes.java | 2 +- 17 files changed, 44 insertions(+), 44 deletions(-) diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AffiliationDescriptorType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AffiliationDescriptorType.java index b41cf04be5..5f5abea90b 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AffiliationDescriptorType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AffiliationDescriptorType.java @@ -126,7 +126,7 @@ public class AffiliationDescriptorType extends TypeWithOtherAttributes { */ public List getAffiliateMember() { if (affiliateMember == null) { - affiliateMember = new ArrayList(); + affiliateMember = new ArrayList<>(); } return this.affiliateMember; } @@ -153,7 +153,7 @@ public class AffiliationDescriptorType extends TypeWithOtherAttributes { */ public List getKeyDescriptor() { if (keyDescriptor == null) { - keyDescriptor = new ArrayList(); + keyDescriptor = new ArrayList<>(); } return this.keyDescriptor; } diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AttributeAuthorityDescriptorType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AttributeAuthorityDescriptorType.java index edc4d9dafe..b7d420b966 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AttributeAuthorityDescriptorType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AttributeAuthorityDescriptorType.java @@ -50,15 +50,15 @@ import java.util.List; public class AttributeAuthorityDescriptorType extends RoleDescriptorType { - protected List attributeService = new ArrayList(); + protected List attributeService = new ArrayList<>(); - protected List assertionIDRequestService = new ArrayList(); + protected List assertionIDRequestService = new ArrayList<>(); - protected List nameIDFormat = new ArrayList(); + protected List nameIDFormat = new ArrayList<>(); - protected List attributeProfile = new ArrayList(); + protected List attributeProfile = new ArrayList<>(); - protected List attribute = new ArrayList(); + protected List attribute = new ArrayList<>(); public AttributeAuthorityDescriptorType(List protocolSupport) { super(protocolSupport); diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AttributeConsumingServiceType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AttributeConsumingServiceType.java index 1650bf8bf2..f0de66fd35 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AttributeConsumingServiceType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AttributeConsumingServiceType.java @@ -46,11 +46,11 @@ import java.util.List; */ public class AttributeConsumingServiceType { - protected List serviceName = new ArrayList(); + protected List serviceName = new ArrayList<>(); - protected List serviceDescription = new ArrayList(); + protected List serviceDescription = new ArrayList<>(); - protected List requestedAttribute = new ArrayList(); + protected List requestedAttribute = new ArrayList<>(); protected int index; diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AuthnAuthorityDescriptorType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AuthnAuthorityDescriptorType.java index f44ad394f5..c191fe2289 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AuthnAuthorityDescriptorType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/AuthnAuthorityDescriptorType.java @@ -44,11 +44,11 @@ import java.util.List; */ public class AuthnAuthorityDescriptorType extends RoleDescriptorType { - protected List authnQueryService = new ArrayList(); + protected List authnQueryService = new ArrayList<>(); - protected List assertionIDRequestService = new ArrayList(); + protected List assertionIDRequestService = new ArrayList<>(); - protected List nameIDFormat = new ArrayList(); + protected List nameIDFormat = new ArrayList<>(); public AuthnAuthorityDescriptorType(List protocolSupport) { super(protocolSupport); diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/ContactType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/ContactType.java index faf43c988d..2a14117919 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/ContactType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/ContactType.java @@ -57,9 +57,9 @@ public class ContactType extends TypeWithOtherAttributes { protected String surName; - protected List emailAddress = new ArrayList(); + protected List emailAddress = new ArrayList<>(); - protected List telephoneNumber = new ArrayList(); + protected List telephoneNumber = new ArrayList<>(); protected ContactTypeType contactType; diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/EndpointType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/EndpointType.java index fd3a111273..3268a4eb7b 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/EndpointType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/EndpointType.java @@ -45,7 +45,7 @@ import java.util.List; */ public class EndpointType extends TypeWithOtherAttributes { - protected List any = new ArrayList(); + protected List any = new ArrayList<>(); protected URI binding; diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/EntitiesDescriptorType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/EntitiesDescriptorType.java index b311b7b42e..7456f130a8 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/EntitiesDescriptorType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/EntitiesDescriptorType.java @@ -58,7 +58,7 @@ public class EntitiesDescriptorType { protected ExtensionsType extensions; - protected List entityDescriptor = new ArrayList(); + protected List entityDescriptor = new ArrayList<>(); protected XMLGregorianCalendar validUntil; diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/EntityDescriptorType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/EntityDescriptorType.java index 18027c836a..87a245628c 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/EntityDescriptorType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/EntityDescriptorType.java @@ -67,7 +67,7 @@ public class EntityDescriptorType extends TypeWithOtherAttributes { public static class EDTChoiceType { - private List descriptors = new ArrayList(); + private List descriptors = new ArrayList<>(); private AffiliationDescriptorType affiliationDescriptor; @@ -88,7 +88,7 @@ public class EntityDescriptorType extends TypeWithOtherAttributes { } public static EDTChoiceType oneValue(EDTDescriptorChoiceType edt) { - List aList = new ArrayList(); + List aList = new ArrayList<>(); aList.add(edt); return new EDTChoiceType(aList); } @@ -160,11 +160,11 @@ public class EntityDescriptorType extends TypeWithOtherAttributes { protected ExtensionsType extensions; - protected List choiceType = new ArrayList(); + protected List choiceType = new ArrayList<>(); protected OrganizationType organization; - protected List contactPerson = new ArrayList(); + protected List contactPerson = new ArrayList<>(); protected List additionalMetadataLocation = new ArrayList(); diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/ExtensionsType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/ExtensionsType.java index 3420167779..57f926528c 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/ExtensionsType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/ExtensionsType.java @@ -43,7 +43,7 @@ import java.util.List; */ public class ExtensionsType { - protected List any = new ArrayList(); + protected List any = new ArrayList<>(); /** * Function is obsoleted with getAny diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/IDPSSODescriptorType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/IDPSSODescriptorType.java index ec18c586d1..48efa49289 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/IDPSSODescriptorType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/IDPSSODescriptorType.java @@ -51,15 +51,15 @@ import java.util.List; */ public class IDPSSODescriptorType extends SSODescriptorType { - protected List singleSignOnService = new ArrayList(); + protected List singleSignOnService = new ArrayList<>(); - protected List nameIDMappingService = new ArrayList(); + protected List nameIDMappingService = new ArrayList<>(); - protected List assertionIDRequestService = new ArrayList(); + protected List assertionIDRequestService = new ArrayList<>(); - protected List attributeProfile = new ArrayList(); + protected List attributeProfile = new ArrayList<>(); - protected List attribute = new ArrayList(); + protected List attribute = new ArrayList<>(); protected Boolean wantAuthnRequestsSigned = false; diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/KeyDescriptorType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/KeyDescriptorType.java index 1dca0618e6..6ffa7543df 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/KeyDescriptorType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/KeyDescriptorType.java @@ -49,7 +49,7 @@ public class KeyDescriptorType { protected Element keyInfo; - protected List encryptionMethod = new ArrayList(); + protected List encryptionMethod = new ArrayList<>(); protected KeyTypes use; diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/OrganizationType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/OrganizationType.java index dcc73d16d3..a0ed9e39d9 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/OrganizationType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/OrganizationType.java @@ -47,11 +47,11 @@ public class OrganizationType extends TypeWithOtherAttributes { protected ExtensionsType extensions; - protected List organizationName = new ArrayList(); + protected List organizationName = new ArrayList<>(); - protected List organizationDisplayName = new ArrayList(); + protected List organizationDisplayName = new ArrayList<>(); - protected List organizationURL = new ArrayList(); + protected List organizationURL = new ArrayList<>(); /** * Add an organization name diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/PDPDescriptorType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/PDPDescriptorType.java index 1dcd98f91f..30b78303f4 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/PDPDescriptorType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/PDPDescriptorType.java @@ -44,11 +44,11 @@ import java.util.List; */ public class PDPDescriptorType extends RoleDescriptorType { - protected List authzService = new ArrayList(); + protected List authzService = new ArrayList<>(); - protected List assertionIDRequestService = new ArrayList(); + protected List assertionIDRequestService = new ArrayList<>(); - protected List nameIDFormat = new ArrayList(); + protected List nameIDFormat = new ArrayList<>(); public PDPDescriptorType(List protocolSupport) { super(protocolSupport); diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/RoleDescriptorType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/RoleDescriptorType.java index d328ece559..a46d03c1a5 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/RoleDescriptorType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/RoleDescriptorType.java @@ -59,11 +59,11 @@ public abstract class RoleDescriptorType extends TypeWithOtherAttributes { protected ExtensionsType extensions; - protected List keyDescriptor = new ArrayList(); + protected List keyDescriptor = new ArrayList<>(); protected OrganizationType organization; - protected List contactPerson = new ArrayList(); + protected List contactPerson = new ArrayList<>(); protected String id; @@ -71,7 +71,7 @@ public abstract class RoleDescriptorType extends TypeWithOtherAttributes { protected Duration cacheDuration; - protected List protocolSupportEnumeration = new ArrayList(); + protected List protocolSupportEnumeration = new ArrayList<>(); protected String errorURL; diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/SPSSODescriptorType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/SPSSODescriptorType.java index d28ef308f8..bc3721e8c5 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/SPSSODescriptorType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/SPSSODescriptorType.java @@ -45,9 +45,9 @@ import java.util.List; */ public class SPSSODescriptorType extends SSODescriptorType { - protected List assertionConsumerService = new ArrayList(); + protected List assertionConsumerService = new ArrayList<>(); - protected List attributeConsumingService = new ArrayList(); + protected List attributeConsumingService = new ArrayList<>(); protected boolean authnRequestsSigned = false; diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/SSODescriptorType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/SSODescriptorType.java index a0b7aa0231..d5692f8658 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/SSODescriptorType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/SSODescriptorType.java @@ -47,13 +47,13 @@ import java.util.List; */ public abstract class SSODescriptorType extends RoleDescriptorType { - protected List artifactResolutionService = new ArrayList(); + protected List artifactResolutionService = new ArrayList<>(); - protected List singleLogoutService = new ArrayList(); + protected List singleLogoutService = new ArrayList<>(); - protected List manageNameIDService = new ArrayList(); + protected List manageNameIDService = new ArrayList<>(); - protected List nameIDFormat = new ArrayList(); + protected List nameIDFormat = new ArrayList<>(); public SSODescriptorType(List protocolSupport) { super(protocolSupport); diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/TypeWithOtherAttributes.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/TypeWithOtherAttributes.java index dca18fed63..6d826f9713 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/TypeWithOtherAttributes.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/metadata/TypeWithOtherAttributes.java @@ -29,7 +29,7 @@ import java.util.Map; */ public abstract class TypeWithOtherAttributes { - protected Map otherAttributes = new HashMap(); + protected Map otherAttributes = new HashMap<>(); /** * Add other attribute