You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by mu...@apache.org on 2009/02/19 17:11:53 UTC

svn commit: r745911 - /xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java

Author: mullan
Date: Thu Feb 19 16:11:52 2009
New Revision: 745911

URL: http://svn.apache.org/viewvc?rev=745911&view=rev
Log:
Fixed bug 46732: Failed to add more than one child element to EncryptionMethod.

Modified:
    xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java

Modified: xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java?rev=745911&r1=745910&r2=745911&view=diff
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/encryption/XMLCipher.java Thu Feb 19 16:11:52 2009
@@ -1,5 +1,5 @@
 /*
- * Copyright  2003-2004 The Apache Software Foundation.
+ * Copyright 2003-2009 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
  */
 package org.apache.xml.security.encryption;
 
-
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
 import java.io.IOException;
@@ -68,7 +67,6 @@
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 
-
 /**
  * <code>XMLCipher</code> encrypts and decrypts the contents of
  * <code>Document</code>s, <code>Element</code>s and <code>Element</code>
@@ -3514,8 +3512,8 @@
                             _contextDocument.createTextNode(
                                 new String(oaepParams))));
                 }
-                if (!encryptionMethodInformation.isEmpty()) {
-                    Iterator itr = encryptionMethodInformation.iterator();
+                Iterator itr = encryptionMethodInformation.iterator();
+                while (itr.hasNext()) {
                     result.appendChild((Element) itr.next());
                 }