[JIRA] Commented: (JOST-192) org.opensaml.saml2.metadata.provider.SignatureValidationFilter => java.lang.UnsupportedOperationException
Brent Putman (JIRA)
noreply at shibboleth.net
Fri Sep 28 19:36:21 EDT 2012
[ https://issues.shibboleth.net/jira/browse/JOST-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14431#comment-14431 ]
Brent Putman commented on JOST-192:
-----------------------------------
This was regression bug from April 2009 and JXT-54. IndexedXMLObjectChildrenList sublists were changed to no longer support mutation using the numerical index method variants. The java.util.AbstractList iterator impl, which is what the sublist iterator is since we don't supply an impl, supports the remove() operation by using the indexed-based methods, so remove() no longer works properly on iterators of sublists.
I don't know if it's possible to make the sublist index methods work, back in 2009 we concluded it was not realistic, at the very least very messy. It might be possible to supply a custom sublist iterator that could support remove(), but don't want to introduce that complexity at the moment.
The workaround for the signature filter here is to just not use the iterator remove() at all. Just note the children to be removed in a separate collection and after iteration is complete, remove them all at once.
> org.opensaml.saml2.metadata.provider.SignatureValidationFilter => java.lang.UnsupportedOperationException
> ---------------------------------------------------------------------------------------------------------
>
> Key: JOST-192
> URL: https://issues.shibboleth.net/jira/browse/JOST-192
> Project: OpenSAML 2 - Java
> Issue Type: Bug
> Components: SAML 2
> Affects Versions: 2.5.3
> Environment: ubuntu 12.04 / Java 6 sun 1.6.0_31 / apache tomcat 6
> Reporter: Olivier Franco
> Assignee: Brent Putman
> Fix For: 2.5.4
>
>
> in class org.opensaml.saml2.metadata.provider.SignatureValidationFilter :
> when an invalid sp metadate is removed; a java.lang.UnsupportedOperationException is thrown !
> the remove() method for Iterator<EntityDescriptor> entityIter is not implemented
> [org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider:264] - Error occurred while attempting to refresh metadata from '{}'
> java.lang.UnsupportedOperationException: null
> at
> org.opensaml.xml.util.ListView.remove(IndexedXMLObjectChildrenList.java:332) ~[xmltooling-1.3.4.jar:na]
> at
> org.opensaml.xml.util.ListView.remove(IndexedXMLObjectChildrenList.java:238) ~[xmltooling-1.3.4.jar:na]
> at java.util.AbstractList$Itr.remove(AbstractList.java:360)
> ~[na:1.6.0_31]
> at
> org.opensaml.saml2.metadata.provider.SignatureValidationFilter.processEntityGroup(SignatureValidationFilter.java:256) ~[opensaml-2.5.3.jar:na]
> at
> org.opensaml.saml2.metadata.provider.SignatureValidationFilter.doFilter(SignatureValidationFilter.java:157) ~[opensaml-2.5.3.jar:na]
> at
> org.opensaml.saml2.metadata.provider.MetadataFilterChain.doFilter(MetadataFilterChain.java:55) ~[opensaml-2.5.3.jar:na]
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the commits
mailing list