@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
/ *
* Copyright 2002 - 2022 the original author or authors .
* Copyright 2002 - 2025 the original author or authors .
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
@ -19,7 +19,6 @@ package org.springframework.security.saml2.provider.service.authentication;
@@ -19,7 +19,6 @@ package org.springframework.security.saml2.provider.service.authentication;
import java.util.Collections ;
import java.util.List ;
import javax.annotation.Nonnull ;
import javax.annotation.Nullable ;
import javax.xml.namespace.QName ;
@ -40,6 +39,7 @@ import org.opensaml.saml.common.xml.SAMLConstants;
@@ -40,6 +39,7 @@ import org.opensaml.saml.common.xml.SAMLConstants;
import org.opensaml.saml.saml2.core.AttributeValue ;
import org.w3c.dom.Element ;
import org.springframework.lang.NonNull ;
import org.springframework.security.saml2.core.OpenSamlInitializationService ;
public final class TestCustomOpenSaml4Objects {
@ -103,7 +103,7 @@ public final class TestCustomOpenSaml4Objects {
@@ -103,7 +103,7 @@ public final class TestCustomOpenSaml4Objects {
public static class CustomOpenSamlObjectImpl extends AbstractXMLObject implements CustomOpenSamlObject {
@Nonn ull
@NonN ull
private IndexedXMLObjectChildrenList < XMLObject > unknownXMLObjects ;
/ * *
@ -113,22 +113,22 @@ public final class TestCustomOpenSaml4Objects {
@@ -113,22 +113,22 @@ public final class TestCustomOpenSaml4Objects {
* represents
* @param namespacePrefix the prefix for the given namespace
* /
protected CustomOpenSamlObjectImpl ( @Nullable String namespaceURI , @Nonnull String elementLocalName ,
@Nullable String namespacePrefix ) {
protected CustomOpenSamlObjectImpl ( @javax.annotation. Nullable String namespaceURI ,
@NonNull String elementLocalName , @N ullable String namespacePrefix ) {
super ( namespaceURI , elementLocalName , namespacePrefix ) ;
super . getNamespaceManager ( ) . registerNamespaceDeclaration ( new Namespace ( CUSTOM_NS , TYPE_CUSTOM_PREFIX ) ) ;
this . unknownXMLObjects = new IndexedXMLObjectChildrenList < > ( this ) ;
}
@Nonn ull
@NonN ull
@Override
public List < XMLObject > getUnknownXMLObjects ( ) {
return this . unknownXMLObjects ;
}
@Nonn ull
@NonN ull
@Override
public List < XMLObject > getUnknownXMLObjects ( @Nonn ull QName typeOrName ) {
public List < XMLObject > getUnknownXMLObjects ( @NonN ull QName typeOrName ) {
return ( List < XMLObject > ) this . unknownXMLObjects . subList ( typeOrName ) ;
}
@ -162,9 +162,9 @@ public final class TestCustomOpenSaml4Objects {
@@ -162,9 +162,9 @@ public final class TestCustomOpenSaml4Objects {
public static class CustomSamlObjectBuilder extends AbstractXMLObjectBuilder < CustomOpenSamlObject > {
@Nonn ull
@NonN ull
@Override
public CustomOpenSamlObject buildObject ( @Nullable String namespaceURI , @Nonn ull String localName ,
public CustomOpenSamlObject buildObject ( @Nullable String namespaceURI , @NonN ull String localName ,
@Nullable String namespacePrefix ) {
return new CustomOpenSamlObjectImpl ( namespaceURI , localName , namespacePrefix ) ;
}
@ -178,7 +178,7 @@ public final class TestCustomOpenSaml4Objects {
@@ -178,7 +178,7 @@ public final class TestCustomOpenSaml4Objects {
}
@Override
protected void marshallElementContent ( @Nonn ull XMLObject xmlObject , @Nonn ull Element domElement ) {
protected void marshallElementContent ( @NonN ull XMLObject xmlObject , @NonN ull Element domElement ) {
final CustomOpenSamlObject customSamlObject = ( CustomOpenSamlObject ) xmlObject ;
for ( XMLObject object : customSamlObject . getOrderedChildren ( ) ) {
@ -195,15 +195,15 @@ public final class TestCustomOpenSaml4Objects {
@@ -195,15 +195,15 @@ public final class TestCustomOpenSaml4Objects {
}
@Override
protected void processChildElement ( @Nonn ull XMLObject parentXMLObject , @Nonn ull XMLObject childXMLObject )
protected void processChildElement ( @NonN ull XMLObject parentXMLObject , @NonN ull XMLObject childXMLObject )
throws UnmarshallingException {
final CustomOpenSamlObject customSamlObject = ( CustomOpenSamlObject ) parentXMLObject ;
customSamlObject . getUnknownXMLObjects ( ) . add ( childXMLObject ) ;
}
@Nonn ull
@NonN ull
@Override
protected XMLObject buildXMLObject ( @Nonn ull Element domElement ) {
protected XMLObject buildXMLObject ( @NonN ull Element domElement ) {
return new CustomOpenSamlObjectImpl ( SAMLConstants . SAML20_NS , AttributeValue . DEFAULT_ELEMENT_LOCAL_NAME ,
CustomOpenSamlObject . TYPE_CUSTOM_PREFIX ) ;
}