KEYCLOAK-12208 Use diamond operator for collections in package "org.keycloak.dom.saml.v2.metadata" from module "saml-core-api"

This commit is contained in:
Andrei Arlou 2019-11-23 00:43:02 +03:00 committed by Stian Thorgersen
parent 198e2a989f
commit c0ebd786e3
17 changed files with 44 additions and 44 deletions

View file

@ -126,7 +126,7 @@ public class AffiliationDescriptorType extends TypeWithOtherAttributes {
*/ */
public List<String> getAffiliateMember() { public List<String> getAffiliateMember() {
if (affiliateMember == null) { if (affiliateMember == null) {
affiliateMember = new ArrayList<String>(); affiliateMember = new ArrayList<>();
} }
return this.affiliateMember; return this.affiliateMember;
} }
@ -153,7 +153,7 @@ public class AffiliationDescriptorType extends TypeWithOtherAttributes {
*/ */
public List<KeyDescriptorType> getKeyDescriptor() { public List<KeyDescriptorType> getKeyDescriptor() {
if (keyDescriptor == null) { if (keyDescriptor == null) {
keyDescriptor = new ArrayList<KeyDescriptorType>(); keyDescriptor = new ArrayList<>();
} }
return this.keyDescriptor; return this.keyDescriptor;
} }

View file

@ -50,15 +50,15 @@ import java.util.List;
public class AttributeAuthorityDescriptorType extends RoleDescriptorType { public class AttributeAuthorityDescriptorType extends RoleDescriptorType {
protected List<EndpointType> attributeService = new ArrayList<EndpointType>(); protected List<EndpointType> attributeService = new ArrayList<>();
protected List<EndpointType> assertionIDRequestService = new ArrayList<EndpointType>(); protected List<EndpointType> assertionIDRequestService = new ArrayList<>();
protected List<String> nameIDFormat = new ArrayList<String>(); protected List<String> nameIDFormat = new ArrayList<>();
protected List<String> attributeProfile = new ArrayList<String>(); protected List<String> attributeProfile = new ArrayList<>();
protected List<AttributeType> attribute = new ArrayList<AttributeType>(); protected List<AttributeType> attribute = new ArrayList<>();
public AttributeAuthorityDescriptorType(List<String> protocolSupport) { public AttributeAuthorityDescriptorType(List<String> protocolSupport) {
super(protocolSupport); super(protocolSupport);

View file

@ -46,11 +46,11 @@ import java.util.List;
*/ */
public class AttributeConsumingServiceType { public class AttributeConsumingServiceType {
protected List<LocalizedNameType> serviceName = new ArrayList<LocalizedNameType>(); protected List<LocalizedNameType> serviceName = new ArrayList<>();
protected List<LocalizedNameType> serviceDescription = new ArrayList<LocalizedNameType>(); protected List<LocalizedNameType> serviceDescription = new ArrayList<>();
protected List<RequestedAttributeType> requestedAttribute = new ArrayList<RequestedAttributeType>(); protected List<RequestedAttributeType> requestedAttribute = new ArrayList<>();
protected int index; protected int index;

View file

@ -44,11 +44,11 @@ import java.util.List;
*/ */
public class AuthnAuthorityDescriptorType extends RoleDescriptorType { public class AuthnAuthorityDescriptorType extends RoleDescriptorType {
protected List<EndpointType> authnQueryService = new ArrayList<EndpointType>(); protected List<EndpointType> authnQueryService = new ArrayList<>();
protected List<EndpointType> assertionIDRequestService = new ArrayList<EndpointType>(); protected List<EndpointType> assertionIDRequestService = new ArrayList<>();
protected List<String> nameIDFormat = new ArrayList<String>(); protected List<String> nameIDFormat = new ArrayList<>();
public AuthnAuthorityDescriptorType(List<String> protocolSupport) { public AuthnAuthorityDescriptorType(List<String> protocolSupport) {
super(protocolSupport); super(protocolSupport);

View file

@ -57,9 +57,9 @@ public class ContactType extends TypeWithOtherAttributes {
protected String surName; protected String surName;
protected List<String> emailAddress = new ArrayList<String>(); protected List<String> emailAddress = new ArrayList<>();
protected List<String> telephoneNumber = new ArrayList<String>(); protected List<String> telephoneNumber = new ArrayList<>();
protected ContactTypeType contactType; protected ContactTypeType contactType;

View file

@ -45,7 +45,7 @@ import java.util.List;
*/ */
public class EndpointType extends TypeWithOtherAttributes { public class EndpointType extends TypeWithOtherAttributes {
protected List<Object> any = new ArrayList<Object>(); protected List<Object> any = new ArrayList<>();
protected URI binding; protected URI binding;

View file

@ -58,7 +58,7 @@ public class EntitiesDescriptorType {
protected ExtensionsType extensions; protected ExtensionsType extensions;
protected List<Object> entityDescriptor = new ArrayList<Object>(); protected List<Object> entityDescriptor = new ArrayList<>();
protected XMLGregorianCalendar validUntil; protected XMLGregorianCalendar validUntil;

View file

@ -67,7 +67,7 @@ public class EntityDescriptorType extends TypeWithOtherAttributes {
public static class EDTChoiceType { public static class EDTChoiceType {
private List<EDTDescriptorChoiceType> descriptors = new ArrayList<EntityDescriptorType.EDTDescriptorChoiceType>(); private List<EDTDescriptorChoiceType> descriptors = new ArrayList<>();
private AffiliationDescriptorType affiliationDescriptor; private AffiliationDescriptorType affiliationDescriptor;
@ -88,7 +88,7 @@ public class EntityDescriptorType extends TypeWithOtherAttributes {
} }
public static EDTChoiceType oneValue(EDTDescriptorChoiceType edt) { public static EDTChoiceType oneValue(EDTDescriptorChoiceType edt) {
List<EDTDescriptorChoiceType> aList = new ArrayList<EntityDescriptorType.EDTDescriptorChoiceType>(); List<EDTDescriptorChoiceType> aList = new ArrayList<>();
aList.add(edt); aList.add(edt);
return new EDTChoiceType(aList); return new EDTChoiceType(aList);
} }
@ -160,11 +160,11 @@ public class EntityDescriptorType extends TypeWithOtherAttributes {
protected ExtensionsType extensions; protected ExtensionsType extensions;
protected List<EDTChoiceType> choiceType = new ArrayList<EntityDescriptorType.EDTChoiceType>(); protected List<EDTChoiceType> choiceType = new ArrayList<>();
protected OrganizationType organization; protected OrganizationType organization;
protected List<ContactType> contactPerson = new ArrayList<ContactType>(); protected List<ContactType> contactPerson = new ArrayList<>();
protected List<AdditionalMetadataLocationType> additionalMetadataLocation = new ArrayList<AdditionalMetadataLocationType>(); protected List<AdditionalMetadataLocationType> additionalMetadataLocation = new ArrayList<AdditionalMetadataLocationType>();

View file

@ -43,7 +43,7 @@ import java.util.List;
*/ */
public class ExtensionsType { public class ExtensionsType {
protected List<Object> any = new ArrayList<Object>(); protected List<Object> any = new ArrayList<>();
/** /**
* Function is obsoleted with getAny * Function is obsoleted with getAny

View file

@ -51,15 +51,15 @@ import java.util.List;
*/ */
public class IDPSSODescriptorType extends SSODescriptorType { public class IDPSSODescriptorType extends SSODescriptorType {
protected List<EndpointType> singleSignOnService = new ArrayList<EndpointType>(); protected List<EndpointType> singleSignOnService = new ArrayList<>();
protected List<EndpointType> nameIDMappingService = new ArrayList<EndpointType>(); protected List<EndpointType> nameIDMappingService = new ArrayList<>();
protected List<EndpointType> assertionIDRequestService = new ArrayList<EndpointType>(); protected List<EndpointType> assertionIDRequestService = new ArrayList<>();
protected List<String> attributeProfile = new ArrayList<String>(); protected List<String> attributeProfile = new ArrayList<>();
protected List<AttributeType> attribute = new ArrayList<AttributeType>(); protected List<AttributeType> attribute = new ArrayList<>();
protected Boolean wantAuthnRequestsSigned = false; protected Boolean wantAuthnRequestsSigned = false;

View file

@ -49,7 +49,7 @@ public class KeyDescriptorType {
protected Element keyInfo; protected Element keyInfo;
protected List<EncryptionMethodType> encryptionMethod = new ArrayList<EncryptionMethodType>(); protected List<EncryptionMethodType> encryptionMethod = new ArrayList<>();
protected KeyTypes use; protected KeyTypes use;

View file

@ -47,11 +47,11 @@ public class OrganizationType extends TypeWithOtherAttributes {
protected ExtensionsType extensions; protected ExtensionsType extensions;
protected List<LocalizedNameType> organizationName = new ArrayList<LocalizedNameType>(); protected List<LocalizedNameType> organizationName = new ArrayList<>();
protected List<LocalizedNameType> organizationDisplayName = new ArrayList<LocalizedNameType>(); protected List<LocalizedNameType> organizationDisplayName = new ArrayList<>();
protected List<LocalizedURIType> organizationURL = new ArrayList<LocalizedURIType>(); protected List<LocalizedURIType> organizationURL = new ArrayList<>();
/** /**
* Add an organization name * Add an organization name

View file

@ -44,11 +44,11 @@ import java.util.List;
*/ */
public class PDPDescriptorType extends RoleDescriptorType { public class PDPDescriptorType extends RoleDescriptorType {
protected List<EndpointType> authzService = new ArrayList<EndpointType>(); protected List<EndpointType> authzService = new ArrayList<>();
protected List<EndpointType> assertionIDRequestService = new ArrayList<EndpointType>(); protected List<EndpointType> assertionIDRequestService = new ArrayList<>();
protected List<String> nameIDFormat = new ArrayList<String>(); protected List<String> nameIDFormat = new ArrayList<>();
public PDPDescriptorType(List<String> protocolSupport) { public PDPDescriptorType(List<String> protocolSupport) {
super(protocolSupport); super(protocolSupport);

View file

@ -59,11 +59,11 @@ public abstract class RoleDescriptorType extends TypeWithOtherAttributes {
protected ExtensionsType extensions; protected ExtensionsType extensions;
protected List<KeyDescriptorType> keyDescriptor = new ArrayList<KeyDescriptorType>(); protected List<KeyDescriptorType> keyDescriptor = new ArrayList<>();
protected OrganizationType organization; protected OrganizationType organization;
protected List<ContactType> contactPerson = new ArrayList<ContactType>(); protected List<ContactType> contactPerson = new ArrayList<>();
protected String id; protected String id;
@ -71,7 +71,7 @@ public abstract class RoleDescriptorType extends TypeWithOtherAttributes {
protected Duration cacheDuration; protected Duration cacheDuration;
protected List<String> protocolSupportEnumeration = new ArrayList<String>(); protected List<String> protocolSupportEnumeration = new ArrayList<>();
protected String errorURL; protected String errorURL;

View file

@ -45,9 +45,9 @@ import java.util.List;
*/ */
public class SPSSODescriptorType extends SSODescriptorType { public class SPSSODescriptorType extends SSODescriptorType {
protected List<IndexedEndpointType> assertionConsumerService = new ArrayList<IndexedEndpointType>(); protected List<IndexedEndpointType> assertionConsumerService = new ArrayList<>();
protected List<AttributeConsumingServiceType> attributeConsumingService = new ArrayList<AttributeConsumingServiceType>(); protected List<AttributeConsumingServiceType> attributeConsumingService = new ArrayList<>();
protected boolean authnRequestsSigned = false; protected boolean authnRequestsSigned = false;

View file

@ -47,13 +47,13 @@ import java.util.List;
*/ */
public abstract class SSODescriptorType extends RoleDescriptorType { public abstract class SSODescriptorType extends RoleDescriptorType {
protected List<IndexedEndpointType> artifactResolutionService = new ArrayList<IndexedEndpointType>(); protected List<IndexedEndpointType> artifactResolutionService = new ArrayList<>();
protected List<EndpointType> singleLogoutService = new ArrayList<EndpointType>(); protected List<EndpointType> singleLogoutService = new ArrayList<>();
protected List<EndpointType> manageNameIDService = new ArrayList<EndpointType>(); protected List<EndpointType> manageNameIDService = new ArrayList<>();
protected List<String> nameIDFormat = new ArrayList<String>(); protected List<String> nameIDFormat = new ArrayList<>();
public SSODescriptorType(List<String> protocolSupport) { public SSODescriptorType(List<String> protocolSupport) {
super(protocolSupport); super(protocolSupport);

View file

@ -29,7 +29,7 @@ import java.util.Map;
*/ */
public abstract class TypeWithOtherAttributes { public abstract class TypeWithOtherAttributes {
protected Map<QName, String> otherAttributes = new HashMap<QName, String>(); protected Map<QName, String> otherAttributes = new HashMap<>();
/** /**
* Add other attribute * Add other attribute