[java-opensaml COMMIT] /trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/encryption/support/Decrypter.java
noreply at shibboleth.net
noreply at shibboleth.net
Wed Mar 6 14:44:47 EST 2013
Author: scantor
Date: Wed Mar 6 14:44:46 2013
New Revision: 3245
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3245&view=rev
Log:
OSJ-28: ported r797
Modified:
trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/encryption/support/Decrypter.java
Modified: trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/encryption/support/Decrypter.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/encryption/support/Decrypter.java?rev=3245&r1=3244&r2=3245&view=diff
==============================================================================
--- trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/encryption/support/Decrypter.java (original)
+++ trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/encryption/support/Decrypter.java Wed Mar 6 14:44:46 2013
@@ -965,6 +965,15 @@
Element targetElement = xmlObject.getDOM();
if (targetElement == null) {
Marshaller marshaller = XMLObjectProviderRegistrySupport.getMarshallerFactory().getMarshaller(xmlObject);
+ if (marshaller == null) {
+ marshaller = XMLObjectProviderRegistrySupport.getMarshallerFactory().getMarshaller(
+ XMLObjectProviderRegistrySupport.getDefaultProviderQName());
+ if (marshaller == null) {
+ String errorMsg = "No marshaller available for " + xmlObject.getElementQName();
+ log.error(errorMsg);
+ throw new DecryptionException(errorMsg);
+ }
+ }
try {
targetElement = marshaller.marshall(xmlObject);
} catch (MarshallingException e) {
More information about the commits
mailing list