Author: hadrian
Date: Wed Jun 29 19:06:47 2011
New Revision: 1141197
URL: http://svn.apache.org/viewvc?rev=1141197&view=rev
Log:
CAMEL-4061. Fixed failing tests after backport to 2.7.x branch
Modified:
camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java
camel/branches/camel-2.7.x/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java
Modified:
camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java?rev=1141197&r1=1141196&r2=1141197&view=diff
==============================================================================
---
camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java
(original)
+++
camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java
Wed Jun 29 19:06:47 2011
@@ -58,26 +58,19 @@ public class XMLSecurityDataFormat exten
}
public XMLSecurityDataFormat(String secureTag, boolean secureTagContents,
String passPhrase) {
- this();
- this.setSecureTag(secureTag);
- this.setSecureTagContents(secureTagContents);
+ this(secureTag, secureTagContents);
this.setPassPhrase(passPhrase);
}
- public XMLSecurityDataFormat(String secureTag, boolean secureTagContents,
String passPhrase,
- String xmlCipherAlgorithm) {
- this();
- this.setSecureTag(secureTag);
- this.setSecureTagContents(secureTagContents);
+ public XMLSecurityDataFormat(String secureTag, boolean secureTagContents,
+ String passPhrase, String xmlCipherAlgorithm) {
+ this(secureTag, secureTagContents, passPhrase);
this.setXmlCipherAlgorithm(xmlCipherAlgorithm);
- this.setKeyCipherAlgorithm(keyCipherAlgorithm);
}
public XMLSecurityDataFormat(String secureTag, boolean secureTagContents,
String recipientKeyAlias,
- String xmlCipherAlgorithm, String keyCipherAlgorithm) {
- this();
- this.setSecureTag(secureTag);
- this.setSecureTagContents(secureTagContents);
+ String xmlCipherAlgorithm, String keyCipherAlgorithm) {
+ this(secureTag, secureTagContents);
this.setRecipientKeyAlias(recipientKeyAlias);
this.setXmlCipherAlgorithm(xmlCipherAlgorithm);
this.setKeyCipherAlgorithm(keyCipherAlgorithm);
@@ -103,11 +96,11 @@ public class XMLSecurityDataFormat exten
} else {
setProperty(dataFormat, "xmlCipherAlgorithm", TRIPLEDES);
}
- if(getKeyCipherAlgorithm() != null) {
- setProperty(dataFormat, "keyCipherAlgorithm",
getKeyCipherAlgorithm());
+ if (getKeyCipherAlgorithm() != null) {
+ setProperty(dataFormat, "keyCipherAlgorithm",
getKeyCipherAlgorithm());
}
- if(getRecipientKeyAlias() != null) {
- setProperty(dataFormat, "recipientKeyAlias",
getRecipientKeyAlias());
+ if (getRecipientKeyAlias() != null) {
+ setProperty(dataFormat, "recipientKeyAlias",
getRecipientKeyAlias());
}
}
@@ -148,7 +141,7 @@ public class XMLSecurityDataFormat exten
}
public void setKeyCipherAlgorithm(String keyCipherAlgorithm) {
- this.keyCipherAlgorithm = keyCipherAlgorithm;
+ this.keyCipherAlgorithm = keyCipherAlgorithm;
}
public String getKeyCipherAlgorithm() {
Modified:
camel/branches/camel-2.7.x/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java?rev=1141197&r1=1141196&r2=1141197&view=diff
==============================================================================
---
camel/branches/camel-2.7.x/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java
(original)
+++
camel/branches/camel-2.7.x/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java
Wed Jun 29 19:06:47 2011
@@ -35,7 +35,6 @@ import org.apache.camel.component.mock.M
import org.apache.camel.converter.jaxp.XmlConverter;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.apache.xml.security.encryption.XMLCipher;
-import org.junit.Ignore;
import org.junit.Test;
/**
@@ -191,7 +190,6 @@ public class XMLSecurityDataFormatTest e
testEncryption();
}
- @Ignore
@Test
public void testPartialPayloadXMLElementEncryptionWithKeyAndAlgorithm()
throws Exception {
final byte[] bits128 = {
@@ -326,7 +324,6 @@ public class XMLSecurityDataFormatTest e
testDecryption();
}
- @Ignore
@Test
public void testPartialPayloadXMLContentDecryptionWithKeyAndAlgorithm()
throws Exception {
final byte[] bits128 = {