Skip to content

Commit 186bb24

Browse files
committed
SWS-955 - Polishing
1 parent e34fb93 commit 186bb24

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

spring-ws-security/src/main/java/org/springframework/ws/soap/security/wss4j2/Wss4jSecurityInterceptor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,8 +640,7 @@ protected RequestData initializeValidationRequestData(MessageContext messageCont
640640
requestData.setAllowRSA15KeyTransportAlgorithm(allowRSA15KeyTransportAlgorithm);
641641

642642
requestData.setDisableBSPEnforcement(!bspCompliant);
643-
if (requestData.getBSPEnforcer() != null)
644-
{
643+
if (requestData.getBSPEnforcer() != null) {
645644
requestData.getBSPEnforcer().setDisableBSPRules(!bspCompliant);
646645
}
647646
// allow for qualified password types for .Net interoperability

spring-ws-security/src/test/java/org/springframework/ws/soap/security/wss4j2/Wss4jMessageInterceptorSamlTestCase.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import java.io.IOException;
44
import java.security.cert.X509Certificate;
5-
65
import javax.security.auth.callback.Callback;
76
import javax.security.auth.callback.CallbackHandler;
87
import javax.security.auth.callback.UnsupportedCallbackException;
@@ -16,11 +15,12 @@
1615
import org.apache.wss4j.common.saml.bean.Version;
1716
import org.apache.wss4j.common.saml.builder.SAML2Constants;
1817
import org.junit.Test;
18+
import org.w3c.dom.Document;
19+
1920
import org.springframework.core.io.ClassPathResource;
2021
import org.springframework.ws.context.MessageContext;
2122
import org.springframework.ws.soap.SoapMessage;
2223
import org.springframework.ws.soap.security.wss4j2.support.CryptoFactoryBean;
23-
import org.w3c.dom.Document;
2424

2525
public abstract class Wss4jMessageInterceptorSamlTestCase extends Wss4jTestCase {
2626

@@ -51,8 +51,7 @@ protected void onSetup() throws Exception {
5151
}
5252

5353
@Test
54-
public void testAddSAML() throws Exception
55-
{
54+
public void testAddSAML() throws Exception {
5655
interceptor.setSecurementPassword("123456");
5756
interceptor.setSecurementUsername("rsaKey");
5857
SoapMessage message = loadSoap11Message("empty-soap.xml");
@@ -68,8 +67,7 @@ public void testAddSAML() throws Exception
6867
interceptor.validateMessage(message, messageContext);
6968
}
7069

71-
protected CallbackHandler getSamlCalbackHandler(Crypto crypto, X509Certificate userCert)
72-
{
70+
protected CallbackHandler getSamlCalbackHandler(Crypto crypto, X509Certificate userCert) {
7371
return new SamlCallbackHandler(crypto, userCert);
7472
}
7573

@@ -79,8 +77,7 @@ private class SamlCallbackHandler implements CallbackHandler {
7977

8078
private X509Certificate userCertificate;
8179

82-
public SamlCallbackHandler(Crypto crypto, X509Certificate userCertificate)
83-
{
80+
public SamlCallbackHandler(Crypto crypto, X509Certificate userCertificate) {
8481
this.crypto = crypto;
8582
this.userCertificate = userCertificate;
8683
}

0 commit comments

Comments
 (0)