Skip to content

Add a check to see if the JAXP implementation understands JAXP 1.5 features#96

Merged
pitbulk merged 1 commit intoSAML-Toolkits:masterfrom
siepkes:proxy_support
Feb 14, 2017
Merged

Add a check to see if the JAXP implementation understands JAXP 1.5 features#96
pitbulk merged 1 commit intoSAML-Toolkits:masterfrom
siepkes:proxy_support

Conversation

@siepkes
Copy link
Copy Markdown
Contributor

@siepkes siepkes commented Feb 13, 2017

Added a check to see if the JAXP implementation understands features of JAXP 1.5. Concrete example of when this causes problems is when Xerces is on the classpath. Xerces does not support these features which will trigger an exception an cause the XML validation to always fail. When implementing the OneLogin SAML library in an application you don't always have the luxury of kicking Xerces out of the project ;-).

While checking for a string in an exception might seem odd it is actually the Oracle / Java recommended way. There is even a special documentation page for this exact issuet: https://docs.oracle.com/javase/tutorial/jaxp/properties/error.html . I guess Java 9 jigsaw should also be able to fix something like this. Since then the programmer can actually know which implementation version is present.

There are also other places on the net this issue is discussed. For example RedHat: https://access.redhat.com/solutions/1124603

1.5. Concrete example is Xerces. Xerces does not support these features
which will trigger an exception an cause the XML validation to always
fail.
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.2%) to 95.293% when pulling 25e059b on siepkes:proxy_support into 39d5dac on onelogin:master.

@siepkes
Copy link
Copy Markdown
Contributor Author

siepkes commented Feb 13, 2017

Since the method which is added tests compatibility with the running JVM / classpath I don't see how I could write an effective (ie. something that is not fragile) unit test for that.

@pitbulk pitbulk merged commit cd7bf88 into SAML-Toolkits:master Feb 14, 2017
@siepkes siepkes deleted the proxy_support branch February 14, 2017 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants