You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2017/02/10 14:28:46 UTC
svn commit: r1782477 [1/2] - in /webservices/wss4j/trunk:
bindings/src/main/java/org/apache/wss4j/binding/wss10/
bindings/src/main/java/org/apache/wss4j/binding/wssc13/
bindings/src/main/java/org/apache/wss4j/binding/wssc200502/
bindings/src/main/java/...
Author: coheigea
Date: Fri Feb 10 14:28:45 2017
New Revision: 1782477
URL: http://svn.apache.org/viewvc?rev=1782477&view=rev
Log:
Removing redundant type information
Modified:
webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/EmbeddedType.java
webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/SecurityHeaderType.java
webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/SecurityTokenReferenceType.java
webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/TransformationParametersType.java
webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/UsernameTokenType.java
webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/PropertiesType.java
webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/SecurityContextTokenType.java
webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/PropertiesType.java
webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/SecurityContextTokenType.java
webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wsu10/TimestampType.java
webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java
webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/AbstractTestBase.java
webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/PerformanceMemoryTest.java
webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/PerformanceTimingTest.java
webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/MemoryReplayCache.java
webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AttributeStatementBean.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/UseReqSigCertTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/TimestampTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/WCFUsernameTokenTest.java
webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/ConfigurationConverter.java
webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/utils/WSSUtils.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentCallbackHandler.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/HeaderOrderingTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InteroperabilityTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SecurityContextTokenTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureConfirmationTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureEncryptionTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/TimestampTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenSVTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SamlConditionsTest.java
Modified: webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/EmbeddedType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/EmbeddedType.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/EmbeddedType.java (original)
+++ webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/EmbeddedType.java Fri Feb 10 14:28:45 2017
@@ -103,7 +103,7 @@ public class EmbeddedType {
*/
public List<Object> getAny() {
if (any == null) {
- any = new ArrayList<Object>();
+ any = new ArrayList<>();
}
return this.any;
}
Modified: webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/SecurityHeaderType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/SecurityHeaderType.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/SecurityHeaderType.java (original)
+++ webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/SecurityHeaderType.java Fri Feb 10 14:28:45 2017
@@ -97,7 +97,7 @@ public class SecurityHeaderType {
*/
public List<Object> getAny() {
if (any == null) {
- any = new ArrayList<Object>();
+ any = new ArrayList<>();
}
return this.any;
}
Modified: webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/SecurityTokenReferenceType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/SecurityTokenReferenceType.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/SecurityTokenReferenceType.java (original)
+++ webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/SecurityTokenReferenceType.java Fri Feb 10 14:28:45 2017
@@ -111,7 +111,7 @@ public class SecurityTokenReferenceType
*/
public List<Object> getAny() {
if (any == null) {
- any = new ArrayList<Object>();
+ any = new ArrayList<>();
}
return this.any;
}
@@ -164,7 +164,7 @@ public class SecurityTokenReferenceType
*/
public List<String> getUsage() {
if (usage == null) {
- usage = new ArrayList<String>();
+ usage = new ArrayList<>();
}
return this.usage;
}
Modified: webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/TransformationParametersType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/TransformationParametersType.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/TransformationParametersType.java (original)
+++ webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/TransformationParametersType.java Fri Feb 10 14:28:45 2017
@@ -97,7 +97,7 @@ public class TransformationParametersTyp
*/
public List<Object> getAny() {
if (any == null) {
- any = new ArrayList<Object>();
+ any = new ArrayList<>();
}
return this.any;
}
Modified: webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/UsernameTokenType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/UsernameTokenType.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/UsernameTokenType.java (original)
+++ webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wss10/UsernameTokenType.java Fri Feb 10 14:28:45 2017
@@ -137,7 +137,7 @@ public class UsernameTokenType {
*/
public List<Object> getAny() {
if (any == null) {
- any = new ArrayList<Object>();
+ any = new ArrayList<>();
}
return this.any;
}
Modified: webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/PropertiesType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/PropertiesType.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/PropertiesType.java (original)
+++ webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/PropertiesType.java Fri Feb 10 14:28:45 2017
@@ -91,7 +91,7 @@ public class PropertiesType
*/
public List<Object> getAny() {
if (any == null) {
- any = new ArrayList<Object>();
+ any = new ArrayList<>();
}
return this.any;
}
Modified: webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/SecurityContextTokenType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/SecurityContextTokenType.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/SecurityContextTokenType.java (original)
+++ webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc13/SecurityContextTokenType.java Fri Feb 10 14:28:45 2017
@@ -116,7 +116,7 @@ public class SecurityContextTokenType
*/
public List<Object> getAny() {
if (any == null) {
- any = new ArrayList<Object>();
+ any = new ArrayList<>();
}
return this.any;
}
Modified: webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/PropertiesType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/PropertiesType.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/PropertiesType.java (original)
+++ webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/PropertiesType.java Fri Feb 10 14:28:45 2017
@@ -91,7 +91,7 @@ public class PropertiesType
*/
public List<Object> getAny() {
if (any == null) {
- any = new ArrayList<Object>();
+ any = new ArrayList<>();
}
return this.any;
}
Modified: webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/SecurityContextTokenType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/SecurityContextTokenType.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/SecurityContextTokenType.java (original)
+++ webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wssc200502/SecurityContextTokenType.java Fri Feb 10 14:28:45 2017
@@ -125,7 +125,7 @@ public class SecurityContextTokenType
*/
public List<Object> getAny() {
if (any == null) {
- any = new ArrayList<Object>();
+ any = new ArrayList<>();
}
return this.any;
}
Modified: webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wsu10/TimestampType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wsu10/TimestampType.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wsu10/TimestampType.java (original)
+++ webservices/wss4j/trunk/bindings/src/main/java/org/apache/wss4j/binding/wsu10/TimestampType.java Fri Feb 10 14:28:45 2017
@@ -169,7 +169,7 @@ public class TimestampType {
*/
public List<Object> getAny() {
if (any == null) {
- any = new ArrayList<Object>();
+ any = new ArrayList<>();
}
return this.any;
}
Modified: webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java (original)
+++ webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java Fri Feb 10 14:28:45 2017
@@ -754,7 +754,7 @@ public class KerberosTest extends Abstra
ByteArrayOutputStream baos = new ByteArrayOutputStream();
OutboundWSSec wsSecOut = WSSec.getOutboundWSSec(securityProperties);
- XMLStreamWriter xmlStreamWriter = wsSecOut.processOutMessage(baos, StandardCharsets.UTF_8.name(), new ArrayList<SecurityEvent>());
+ XMLStreamWriter xmlStreamWriter = wsSecOut.processOutMessage(baos, StandardCharsets.UTF_8.name(), new ArrayList<>());
XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml"));
XmlReaderToWriter.writeAll(xmlStreamReader, xmlStreamWriter);
xmlStreamWriter.close();
@@ -865,7 +865,7 @@ public class KerberosTest extends Abstra
}
});
- final List<KerberosTokenSecurityEvent> kerberosTokenSecurityEvents = new ArrayList<KerberosTokenSecurityEvent>();
+ final List<KerberosTokenSecurityEvent> kerberosTokenSecurityEvents = new ArrayList<>();
InboundWSSec wsSecIn = WSSec.getInboundWSSec(securityProperties);
SecurityEventListener securityEventListener = new SecurityEventListener() {
@@ -962,7 +962,7 @@ public class KerberosTest extends Abstra
}
});
- final List<KerberosTokenSecurityEvent> kerberosTokenSecurityEvents = new ArrayList<KerberosTokenSecurityEvent>();
+ final List<KerberosTokenSecurityEvent> kerberosTokenSecurityEvents = new ArrayList<>();
InboundWSSec wsSecIn = WSSec.getInboundWSSec(securityProperties);
SecurityEventListener securityEventListener = new SecurityEventListener() {
@@ -1021,7 +1021,7 @@ public class KerberosTest extends Abstra
ByteArrayOutputStream baos = new ByteArrayOutputStream();
OutboundWSSec wsSecOut = WSSec.getOutboundWSSec(securityProperties);
- XMLStreamWriter xmlStreamWriter = wsSecOut.processOutMessage(baos, StandardCharsets.UTF_8.name(), new ArrayList<SecurityEvent>());
+ XMLStreamWriter xmlStreamWriter = wsSecOut.processOutMessage(baos, StandardCharsets.UTF_8.name(), new ArrayList<>());
XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml"));
XmlReaderToWriter.writeAll(xmlStreamReader, xmlStreamWriter);
xmlStreamWriter.close();
@@ -1129,7 +1129,7 @@ public class KerberosTest extends Abstra
}
});
- final List<KerberosTokenSecurityEvent> kerberosTokenSecurityEvents = new ArrayList<KerberosTokenSecurityEvent>();
+ final List<KerberosTokenSecurityEvent> kerberosTokenSecurityEvents = new ArrayList<>();
InboundWSSec wsSecIn = WSSec.getInboundWSSec(securityProperties);
SecurityEventListener securityEventListener = new SecurityEventListener() {
@@ -1225,7 +1225,7 @@ public class KerberosTest extends Abstra
}
});
- final List<KerberosTokenSecurityEvent> kerberosTokenSecurityEvents = new ArrayList<KerberosTokenSecurityEvent>();
+ final List<KerberosTokenSecurityEvent> kerberosTokenSecurityEvents = new ArrayList<>();
InboundWSSec wsSecIn = WSSec.getInboundWSSec(securityProperties);
SecurityEventListener securityEventListener = new SecurityEventListener() {
Modified: webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/AbstractTestBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/AbstractTestBase.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/AbstractTestBase.java (original)
+++ webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/AbstractTestBase.java Fri Feb 10 14:28:45 2017
@@ -139,7 +139,7 @@ public abstract class AbstractTestBase e
public Document doInboundSecurity(WSSSecurityProperties securityProperties, XMLStreamReader xmlStreamReader,
SecurityEventListener securityEventListener)
throws XMLStreamException, ParserConfigurationException, XMLSecurityException {
- return doInboundSecurity(securityProperties, xmlStreamReader, new ArrayList<SecurityEvent>(), securityEventListener);
+ return doInboundSecurity(securityProperties, xmlStreamReader, new ArrayList<>(), securityEventListener);
}
public Document doInboundSecurity(WSSSecurityProperties securityProperties, XMLStreamReader xmlStreamReader,
@@ -154,7 +154,7 @@ public abstract class AbstractTestBase e
throws Exception {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
OutboundWSSec wsSecOut = WSSec.getOutboundWSSec(securityProperties);
- XMLStreamWriter xmlStreamWriter = wsSecOut.processOutMessage(baos, "UTF-8", new ArrayList<SecurityEvent>());
+ XMLStreamWriter xmlStreamWriter = wsSecOut.processOutMessage(baos, "UTF-8", new ArrayList<>());
XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(sourceDocument);
XmlReaderToWriter.writeAll(xmlStreamReader, xmlStreamWriter);
xmlStreamWriter.close();
@@ -166,7 +166,7 @@ public abstract class AbstractTestBase e
ByteArrayOutputStream baos = new ByteArrayOutputStream();
WSSSecurityProperties securityProperties = ConfigurationConverter.convert(config);
OutboundWSSec wsSecOut = WSSec.getOutboundWSSec(securityProperties);
- XMLStreamWriter xmlStreamWriter = wsSecOut.processOutMessage(baos, "UTF-8", new ArrayList<SecurityEvent>());
+ XMLStreamWriter xmlStreamWriter = wsSecOut.processOutMessage(baos, "UTF-8", new ArrayList<>());
XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(sourceDocument);
XmlReaderToWriter.writeAll(xmlStreamReader, xmlStreamWriter);
xmlStreamWriter.close();
@@ -277,7 +277,7 @@ public abstract class AbstractTestBase e
// Disable PrefixList checking as the stax code doesn't support this yet
//todo
- List<BSPRule> ignoredRules = new ArrayList<BSPRule>();
+ List<BSPRule> ignoredRules = new ArrayList<>();
ignoredRules.add(BSPRule.R5404);
ignoredRules.add(BSPRule.R5406);
ignoredRules.add(BSPRule.R5407);
@@ -529,7 +529,7 @@ public abstract class AbstractTestBase e
*/
List<WSHandlerResult> results = null;
if ((results = (List<WSHandlerResult>) mc.get(WSHandlerConstants.RECV_RESULTS)) == null) {
- results = new ArrayList<WSHandlerResult>();
+ results = new ArrayList<>();
mc.put(WSHandlerConstants.RECV_RESULTS, results);
}
WSHandlerResult rResult = new WSHandlerResult(actor, wsResult);
@@ -545,7 +545,7 @@ public abstract class AbstractTestBase e
protected boolean checkReceiverResults(
List<WSSecurityEngineResult> wsResult, List<Integer> actions
) {
- List<WSSecurityEngineResult> wsSecurityEngineResults = new ArrayList<WSSecurityEngineResult>();
+ List<WSSecurityEngineResult> wsSecurityEngineResults = new ArrayList<>();
for (WSSecurityEngineResult result : wsResult) {
boolean found = false;
for (WSSecurityEngineResult res : wsSecurityEngineResults) {
@@ -610,7 +610,7 @@ public abstract class AbstractTestBase e
protected class TestSecurityEventListener implements SecurityEventListener {
private SecurityEventConstants.Event[] expectedEvents;
- private List<SecurityEvent> receivedSecurityEvents = new ArrayList<SecurityEvent>();
+ private List<SecurityEvent> receivedSecurityEvents = new ArrayList<>();
public TestSecurityEventListener(SecurityEventConstants.Event[] expectedEvents) {
this.expectedEvents = expectedEvents;
@@ -632,7 +632,7 @@ public abstract class AbstractTestBase e
@SuppressWarnings("unchecked")
public <T> List<T> getSecurityEvents(SecurityEventConstants.Event securityEvent) {
- List<T> foundEvents = new ArrayList<T>();
+ List<T> foundEvents = new ArrayList<>();
for (SecurityEvent event : receivedSecurityEvents) {
if (event.getSecurityEventType() == securityEvent) {
foundEvents.add((T) event);
Modified: webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/PerformanceMemoryTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/PerformanceMemoryTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/PerformanceMemoryTest.java (original)
+++ webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/PerformanceMemoryTest.java Fri Feb 10 14:28:45 2017
@@ -294,7 +294,7 @@ public class PerformanceMemoryTest exten
}
InputStream sourceDocument = new BufferedInputStream(new FileInputStream(source));
- XMLStreamWriter xmlStreamWriter = outboundWSSec.processOutMessage(new BufferedOutputStream(new FileOutputStream(output)), "UTF-8", new ArrayList<SecurityEvent>());
+ XMLStreamWriter xmlStreamWriter = outboundWSSec.processOutMessage(new BufferedOutputStream(new FileOutputStream(output)), "UTF-8", new ArrayList<>());
XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(sourceDocument);
XmlReaderToWriter.writeAll(xmlStreamReader, xmlStreamWriter);
xmlStreamWriter.close();
@@ -322,7 +322,7 @@ public class PerformanceMemoryTest exten
}
InputStream sourceDocument = new BufferedInputStream(new FileInputStream(source));
- XMLStreamWriter xmlStreamWriter = outboundWSSecCompressed.processOutMessage(new BufferedOutputStream(new FileOutputStream(output)), "UTF-8", new ArrayList<SecurityEvent>());
+ XMLStreamWriter xmlStreamWriter = outboundWSSecCompressed.processOutMessage(new BufferedOutputStream(new FileOutputStream(output)), "UTF-8", new ArrayList<>());
XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(sourceDocument);
XmlReaderToWriter.writeAll(xmlStreamReader, xmlStreamWriter);
xmlStreamWriter.close();
Modified: webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/PerformanceTimingTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/PerformanceTimingTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/PerformanceTimingTest.java (original)
+++ webservices/wss4j/trunk/performance/src/test/java/org/apache/wss4j/performance/PerformanceTimingTest.java Fri Feb 10 14:28:45 2017
@@ -214,7 +214,7 @@ public class PerformanceTimingTest exten
}
InputStream sourceDocument = new BufferedInputStream(new FileInputStream(source));
- XMLStreamWriter xmlStreamWriter = outboundWSSec.processOutMessage(new BufferedOutputStream(new FileOutputStream(output)), "UTF-8", new ArrayList<SecurityEvent>());
+ XMLStreamWriter xmlStreamWriter = outboundWSSec.processOutMessage(new BufferedOutputStream(new FileOutputStream(output)), "UTF-8", new ArrayList<>());
XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(sourceDocument);
XmlReaderToWriter.writeAll(xmlStreamReader, xmlStreamWriter);
xmlStreamWriter.close();
@@ -242,7 +242,7 @@ public class PerformanceTimingTest exten
}
InputStream sourceDocument = new BufferedInputStream(new FileInputStream(source));
- XMLStreamWriter xmlStreamWriter = outboundWSSecCompressed.processOutMessage(new BufferedOutputStream(new FileOutputStream(output)), "UTF-8", new ArrayList<SecurityEvent>());
+ XMLStreamWriter xmlStreamWriter = outboundWSSecCompressed.processOutMessage(new BufferedOutputStream(new FileOutputStream(output)), "UTF-8", new ArrayList<>());
XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(sourceDocument);
XmlReaderToWriter.writeAll(xmlStreamReader, xmlStreamWriter);
xmlStreamWriter.close();
Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/MemoryReplayCache.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/MemoryReplayCache.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/MemoryReplayCache.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/MemoryReplayCache.java Fri Feb 10 14:28:45 2017
@@ -40,7 +40,7 @@ public class MemoryReplayCache implement
public static final long DEFAULT_TTL = 60L * 5L;
public static final long MAX_TTL = DEFAULT_TTL * 12L;
private final SortedMap<Date, List<String>> cache = new TreeMap<>();
- private final Set<String> ids = Collections.synchronizedSet(new HashSet<String>());
+ private final Set<String> ids = Collections.synchronizedSet(new HashSet<>());
/**
* Add the given identifier to the cache. It will be cached for a default amount of time.
Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AttributeStatementBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AttributeStatementBean.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AttributeStatementBean.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/AttributeStatementBean.java Fri Feb 10 14:28:45 2017
@@ -34,7 +34,7 @@ public class AttributeStatementBean {
* Constructor SamlAttributeStatement creates a new SamlAttributeStatement instance.
*/
public AttributeStatementBean() {
- attributeBeans = new ArrayList<AttributeBean>();
+ attributeBeans = new ArrayList<>();
}
/**
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/UseReqSigCertTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/UseReqSigCertTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/UseReqSigCertTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/UseReqSigCertTest.java Fri Feb 10 14:28:45 2017
@@ -215,7 +215,7 @@ public class UseReqSigCertTest extends o
config.put(WSHandlerConstants.RECV_RESULTS, handlerResults);
reqData.setMsgContext(config);
- final List<Integer> actions = new ArrayList<Integer>();
+ final List<Integer> actions = new ArrayList<>();
actions.add(WSConstants.ENCR);
final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/TimestampTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/TimestampTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/TimestampTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/TimestampTest.java Fri Feb 10 14:28:45 2017
@@ -670,7 +670,7 @@ public class TimestampTest extends org.j
WSSConfig wssConfig = WSSConfig.getNewInstance();
wssConfig.setValidator(WSConstants.TIMESTAMP, new NoOpValidator());
try {
- verify(doc, wssConfig, new ArrayList<BSPRule>());
+ verify(doc, wssConfig, new ArrayList<>());
fail("The timestamp validation should have failed");
} catch (WSSecurityException ex) {
assertTrue(ex.getErrorCode() == WSSecurityException.ErrorCode.INVALID_SECURITY);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/WCFUsernameTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/WCFUsernameTokenTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/WCFUsernameTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/WCFUsernameTokenTest.java Fri Feb 10 14:28:45 2017
@@ -123,7 +123,7 @@ public class WCFUsernameTokenTest extend
* Verifies the soap envelope
*/
private WSHandlerResult verify(Document doc) throws Exception {
- return verify(doc, new ArrayList<BSPRule>(0));
+ return verify(doc, new ArrayList<>(0));
}
/**
Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/ConfigurationConverter.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/ConfigurationConverter.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/ConfigurationConverter.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/ConfigurationConverter.java Fri Feb 10 14:28:45 2017
@@ -90,7 +90,7 @@ public final class ConfigurationConverte
return;
}
String[] single = actionToParse.split("\\s");
- List<Action> actions = new ArrayList<Action>();
+ List<Action> actions = new ArrayList<>();
for (int i = 0; i < single.length; i++) {
if (single[i].equals(ConfigurationConstants.USERNAME_TOKEN)) {
actions.add(WSSConstants.USERNAMETOKEN);
Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/utils/WSSUtils.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/utils/WSSUtils.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/utils/WSSUtils.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/utils/WSSUtils.java Fri Feb 10 14:28:45 2017
@@ -542,7 +542,7 @@ public class WSSUtils extends XMLSecurit
abstractOutputProcessor.createStartElementAndOutputAsEvent(outputProcessorChain,
WSSConstants.TAG_WSSE_SECURITY_TOKEN_REFERENCE, true, attributes);
- attributes = new ArrayList<XMLSecAttribute>(1);
+ attributes = new ArrayList<>(1);
attributes.add(abstractOutputProcessor.createAttribute(WSSConstants.ATT_NULL_URI,
"#" + encryptionPartDef.getKeyId()));
abstractOutputProcessor.createStartElementAndOutputAsEvent(outputProcessorChain,
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java Fri Feb 10 14:28:45 2017
@@ -287,7 +287,7 @@ public abstract class AbstractTestBase e
// Disable PrefixList checking as the stax code doesn't support this yet
//todo
- List<BSPRule> ignoredRules = new ArrayList<BSPRule>();
+ List<BSPRule> ignoredRules = new ArrayList<>();
ignoredRules.add(BSPRule.R5404);
ignoredRules.add(BSPRule.R5406);
ignoredRules.add(BSPRule.R5407);
@@ -547,7 +547,7 @@ public abstract class AbstractTestBase e
*/
List<WSHandlerResult> results = null;
if ((results = (List<WSHandlerResult>) mc.get(WSHandlerConstants.RECV_RESULTS)) == null) {
- results = new ArrayList<WSHandlerResult>();
+ results = new ArrayList<>();
mc.put(WSHandlerConstants.RECV_RESULTS, results);
}
results.add(0, wsResult);
@@ -631,7 +631,7 @@ public abstract class AbstractTestBase e
protected class TestSecurityEventListener implements SecurityEventListener {
private SecurityEventConstants.Event[] expectedEvents;
- private List<SecurityEvent> receivedSecurityEvents = new ArrayList<SecurityEvent>();
+ private List<SecurityEvent> receivedSecurityEvents = new ArrayList<>();
public TestSecurityEventListener(SecurityEventConstants.Event[] expectedEvents) {
this.expectedEvents = expectedEvents;
@@ -653,7 +653,7 @@ public abstract class AbstractTestBase e
@SuppressWarnings("unchecked")
public <T> List<T> getSecurityEvents(SecurityEventConstants.Event securityEvent) {
- List<T> foundEvents = new ArrayList<T>();
+ List<T> foundEvents = new ArrayList<>();
for (SecurityEvent event : receivedSecurityEvents) {
if (event.getSecurityEventType() == securityEvent) {
foundEvents.add((T) event);
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentCallbackHandler.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentCallbackHandler.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentCallbackHandler.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentCallbackHandler.java Fri Feb 10 14:28:45 2017
@@ -41,7 +41,7 @@ public class AttachmentCallbackHandler i
private final List<Attachment> originalRequestAttachments;
private Map<String, Attachment> attachmentMap = new HashMap<String, Attachment>();
- private List<Attachment> responseAttachments = new ArrayList<Attachment>();
+ private List<Attachment> responseAttachments = new ArrayList<>();
public AttachmentCallbackHandler(List<Attachment> attachments) {
originalRequestAttachments = attachments;
@@ -84,7 +84,7 @@ public class AttachmentCallbackHandler i
// Try to match the Attachment Id. Otherwise, add all Attachments.
private List<Attachment> getAttachmentsToAdd(String id) {
- List<Attachment> attachments = new ArrayList<Attachment>();
+ List<Attachment> attachments = new ArrayList<>();
if (attachmentMap.containsKey(id)) {
attachments.add(attachmentMap.get(id));
} else {
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentTest.java Fri Feb 10 14:28:45 2017
@@ -198,7 +198,7 @@ public class AttachmentTest extends Abst
throw new RuntimeException("wrong attachment requested");
}
- List<Attachment> attachments = new ArrayList<Attachment>();
+ List<Attachment> attachments = new ArrayList<>();
attachment.setSourceStream(new ByteArrayInputStream(
SOAPUtil.SAMPLE_SOAP_MSG.replace("15", "16").getBytes(StandardCharsets.UTF_8)));
attachments.add(attachment);
@@ -325,7 +325,7 @@ public class AttachmentTest extends Abst
throw new RuntimeException("wrong attachment requested");
}
- List<Attachment> attachments = new ArrayList<Attachment>();
+ List<Attachment> attachments = new ArrayList<>();
attachments.add(attachment);
attachmentRequestCallback.setAttachments(attachments);
}
@@ -961,7 +961,7 @@ public class AttachmentTest extends Abst
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
if (callbacks[0] instanceof AttachmentRequestCallback) {
AttachmentRequestCallback attachmentRequestCallback = (AttachmentRequestCallback) callbacks[0];
- List<Attachment> attachments = new ArrayList<Attachment>();
+ List<Attachment> attachments = new ArrayList<>();
attachments.add(attachment[0]);
attachmentRequestCallback.setAttachments(attachments);
} else {
@@ -1005,7 +1005,7 @@ public class AttachmentTest extends Abst
throw new RuntimeException("wrong attachment requested");
}
- List<Attachment> attachments = new ArrayList<Attachment>();
+ List<Attachment> attachments = new ArrayList<>();
attachments.add(attachment[0]);
attachmentRequestCallback.setAttachments(attachments);
} else {
@@ -1062,7 +1062,7 @@ public class AttachmentTest extends Abst
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
if (callbacks[0] instanceof AttachmentRequestCallback) {
AttachmentRequestCallback attachmentRequestCallback = (AttachmentRequestCallback) callbacks[0];
- List<Attachment> attachments = new ArrayList<Attachment>();
+ List<Attachment> attachments = new ArrayList<>();
attachments.add(attachment[0]);
attachmentRequestCallback.setAttachments(attachments);
} else {
@@ -1094,7 +1094,7 @@ public class AttachmentTest extends Abst
throw new RuntimeException("wrong attachment requested");
}
- List<Attachment> attachments = new ArrayList<Attachment>();
+ List<Attachment> attachments = new ArrayList<>();
attachments.add(attachment[0]);
if (attachment[0].getHeaders().size() == 6) {
@@ -1155,7 +1155,7 @@ public class AttachmentTest extends Abst
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
if (callbacks[0] instanceof AttachmentRequestCallback) {
AttachmentRequestCallback attachmentRequestCallback = (AttachmentRequestCallback) callbacks[0];
- List<Attachment> attachments = new ArrayList<Attachment>();
+ List<Attachment> attachments = new ArrayList<>();
attachments.add(attachment[0]);
attachmentRequestCallback.setAttachments(attachments);
} else {
@@ -1199,7 +1199,7 @@ public class AttachmentTest extends Abst
throw new RuntimeException("wrong attachment requested");
}
- List<Attachment> attachments = new ArrayList<Attachment>();
+ List<Attachment> attachments = new ArrayList<>();
attachments.add(attachment[0]);
attachmentRequestCallback.setAttachments(attachments);
} else {
@@ -1256,7 +1256,7 @@ public class AttachmentTest extends Abst
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
if (callbacks[0] instanceof AttachmentRequestCallback) {
AttachmentRequestCallback attachmentRequestCallback = (AttachmentRequestCallback) callbacks[0];
- List<Attachment> attachments = new ArrayList<Attachment>();
+ List<Attachment> attachments = new ArrayList<>();
attachments.add(attachment[0]);
attachmentRequestCallback.setAttachments(attachments);
} else {
@@ -1302,7 +1302,7 @@ public class AttachmentTest extends Abst
throw new RuntimeException("wrong attachment requested");
}
- List<Attachment> attachments = new ArrayList<Attachment>();
+ List<Attachment> attachments = new ArrayList<>();
attachments.add(attachment[0]);
attachmentRequestCallback.setAttachments(attachments);
} else {
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java Fri Feb 10 14:28:45 2017
@@ -199,8 +199,8 @@ public class DerivedKeyTokenTest extends
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -276,8 +276,8 @@ public class DerivedKeyTokenTest extends
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -947,10 +947,10 @@ public class DerivedKeyTokenTest extends
String signatureValueCorrelationID = signatureValueSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java Fri Feb 10 14:28:45 2017
@@ -212,8 +212,8 @@ public class EncDecryptionTest extends A
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -358,8 +358,8 @@ public class EncDecryptionTest extends A
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -562,24 +562,24 @@ public class EncDecryptionTest extends A
String encryptedPartCorrelationID17 = contentEncryptedElementSecurityEventList.get(16).getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents1 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents2 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents3 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents4 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents5 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents6 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents7 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents8 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents9 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents10 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents11 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents12 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents13 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents14 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents15 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents16 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents17 = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents1 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents2 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents3 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents4 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents5 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents6 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents7 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents8 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents9 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents10 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents11 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents12 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents13 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents14 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents15 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents16 = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents17 = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -929,8 +929,8 @@ public class EncDecryptionTest extends A
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -1804,8 +1804,8 @@ public class EncDecryptionTest extends A
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -2496,8 +2496,8 @@ public class EncDecryptionTest extends A
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -2570,7 +2570,7 @@ public class EncDecryptionTest extends A
builder.prepare(crypto);
WSEncryptionPart encP = new WSEncryptionPart("definitions", "http://schemas.xmlsoap.org/wsdl/", "Element");
- List<WSEncryptionPart> encryptionParts = new ArrayList<WSEncryptionPart>();
+ List<WSEncryptionPart> encryptionParts = new ArrayList<>();
encryptionParts.add(encP);
Element ref = builder.encryptForRef(null, encryptionParts);
ref.removeChild(ref.getElementsByTagNameNS("http://www.w3.org/2001/04/xmlenc#", "DataReference").item(0));
@@ -2614,7 +2614,7 @@ public class EncDecryptionTest extends A
builder.prepare(crypto);
WSEncryptionPart encP = new WSEncryptionPart("definitions", "http://schemas.xmlsoap.org/wsdl/", "Element");
- List<WSEncryptionPart> encryptionParts = new ArrayList<WSEncryptionPart>();
+ List<WSEncryptionPart> encryptionParts = new ArrayList<>();
encryptionParts.add(encP);
Element ref = builder.encryptForRef(null, encryptionParts);
builder.addExternalRefElement(ref);
@@ -2657,7 +2657,7 @@ public class EncDecryptionTest extends A
builder.prepare(crypto);
WSEncryptionPart encP = new WSEncryptionPart("definitions", "http://schemas.xmlsoap.org/wsdl/", "Element");
- List<WSEncryptionPart> encryptionParts = new ArrayList<WSEncryptionPart>();
+ List<WSEncryptionPart> encryptionParts = new ArrayList<>();
encryptionParts.add(encP);
Element ref = builder.encryptForRef(null, encryptionParts);
builder.prependToHeader();
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/HeaderOrderingTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/HeaderOrderingTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/HeaderOrderingTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/HeaderOrderingTest.java Fri Feb 10 14:28:45 2017
@@ -619,7 +619,7 @@ public class HeaderOrderingTest extends
transformer.transform(new DOMSource(securedDocument), new StreamResult(baos));
}
- final List<SecurityEvent> securityEventList = new ArrayList<SecurityEvent>();
+ final List<SecurityEvent> securityEventList = new ArrayList<>();
//done signature; now test sig-verification:
{
WSSSecurityProperties securityProperties = new WSSSecurityProperties();
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InteroperabilityTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InteroperabilityTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InteroperabilityTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InteroperabilityTest.java Fri Feb 10 14:28:45 2017
@@ -138,11 +138,11 @@ public class InteroperabilityTest extend
String signatureValueCorrelationID = signatureValueSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents1 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents2 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents1 = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents2 = new ArrayList<>();
+ List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -300,12 +300,12 @@ public class InteroperabilityTest extend
String signatureValueCorrelationID = signatureValueSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedElementSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents1 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents2 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedElementSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents1 = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents2 = new ArrayList<>();
+ List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -437,10 +437,10 @@ public class InteroperabilityTest extend
String signatureValueCorrelationID = signatureValueSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents1 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents1 = new ArrayList<>();
+ List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -611,12 +611,12 @@ public class InteroperabilityTest extend
String signatureValueCorrelationID = signatureValueSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedElementSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents1 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents2 = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedElementSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents1 = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents2 = new ArrayList<>();
+ List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -672,7 +672,7 @@ public class InteroperabilityTest extend
transformer.transform(new DOMSource(securedDocument), new StreamResult(baos));
}
- final List<SecurityEvent> securityEventList = new ArrayList<SecurityEvent>();
+ final List<SecurityEvent> securityEventList = new ArrayList<>();
//done signature; now test sig-verification:
{
WSSSecurityProperties securityProperties = new WSSSecurityProperties();
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SecurityContextTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SecurityContextTokenTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SecurityContextTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SecurityContextTokenTest.java Fri Feb 10 14:28:45 2017
@@ -201,8 +201,8 @@ public class SecurityContextTokenTest ex
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -282,8 +282,8 @@ public class SecurityContextTokenTest ex
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -415,9 +415,9 @@ public class SecurityContextTokenTest ex
String signatureValueCorrelationID = signatureValueSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -504,9 +504,9 @@ public class SecurityContextTokenTest ex
String signatureValueCorrelationID = signatureValueSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -671,10 +671,10 @@ public class SecurityContextTokenTest ex
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -770,10 +770,10 @@ public class SecurityContextTokenTest ex
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -894,10 +894,10 @@ public class SecurityContextTokenTest ex
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -993,10 +993,10 @@ public class SecurityContextTokenTest ex
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> encryptedPartSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
@@ -1090,9 +1090,9 @@ public class SecurityContextTokenTest ex
String signatureValueCorrelationID = signatureValueSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureConfirmationTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureConfirmationTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureConfirmationTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureConfirmationTest.java Fri Feb 10 14:28:45 2017
@@ -78,7 +78,7 @@ public class SignatureConfirmationTest e
transformer.transform(new DOMSource(securedDocument), new StreamResult(baos));
}
- final List<SecurityEvent> securityEventList = new ArrayList<SecurityEvent>();
+ final List<SecurityEvent> securityEventList = new ArrayList<>();
//done signature; now test sig-verification:
{
WSSSecurityProperties securityProperties = new WSSSecurityProperties();
@@ -174,7 +174,7 @@ public class SignatureConfirmationTest e
transformer.transform(new DOMSource(securedDocument), new StreamResult(baos));
}
- final List<SecurityEvent> securityEventList = new ArrayList<SecurityEvent>();
+ final List<SecurityEvent> securityEventList = new ArrayList<>();
//done signature; now test sig-verification:
{
WSSSecurityProperties securityProperties = new WSSSecurityProperties();
@@ -241,7 +241,7 @@ public class SignatureConfirmationTest e
@Test
public void testDefaultConfigurationOutbound() throws Exception {
- final List<SecurityEvent> securityEventList = new ArrayList<SecurityEvent>();
+ final List<SecurityEvent> securityEventList = new ArrayList<>();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
WSSSecurityProperties securityProperties = new WSSSecurityProperties();
@@ -337,7 +337,7 @@ public class SignatureConfirmationTest e
@Test
public void testOutboundNoSignatureConfirmation() throws Exception {
- final List<SecurityEvent> securityEventList = new ArrayList<SecurityEvent>();
+ final List<SecurityEvent> securityEventList = new ArrayList<>();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
WSSSecurityProperties securityProperties = new WSSSecurityProperties();
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureEncryptionTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureEncryptionTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureEncryptionTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureEncryptionTest.java Fri Feb 10 14:28:45 2017
@@ -407,7 +407,7 @@ public class SignatureEncryptionTest ext
WSEncryptionPart bst = new WSEncryptionPart("BinarySecurityToken", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Element");
WSEncryptionPart def = new WSEncryptionPart("definitions", "http://schemas.xmlsoap.org/wsdl/", "Element");
- List<WSEncryptionPart> encryptionParts = new ArrayList<WSEncryptionPart>();
+ List<WSEncryptionPart> encryptionParts = new ArrayList<>();
encryptionParts.add(bst);
encryptionParts.add(def);
Element ref = builder.encryptForRef(null, encryptionParts);
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureTest.java Fri Feb 10 14:28:45 2017
@@ -1352,9 +1352,9 @@ public class SignatureTest extends Abstr
String signatureValueCorrelationID = signatureValueSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
- List<SecurityEvent> operationSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signedElementSecurityEvents = new ArrayList<SecurityEvent>();
- List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> operationSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signedElementSecurityEvents = new ArrayList<>();
+ List<SecurityEvent> signatureValueSecurityEvents = new ArrayList<>();
List<SecurityEvent> securityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < securityEvents.size(); i++) {
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/TimestampTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/TimestampTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/TimestampTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/TimestampTest.java Fri Feb 10 14:28:45 2017
@@ -586,7 +586,7 @@ public class TimestampTest extends Abstr
NodeList nodeList = securedDocument.getElementsByTagNameNS(WSSConstants.TAG_WSU_TIMESTAMP.getNamespaceURI(), WSSConstants.TAG_WSU_TIMESTAMP.getLocalPart());
Assert.assertEquals(nodeList.item(0).getParentNode().getLocalName(), WSSConstants.TAG_WSSE_SECURITY.getLocalPart());
- List<Node> nodesToRemove = new ArrayList<Node>();
+ List<Node> nodesToRemove = new ArrayList<>();
for (int i = 0; i < nodeList.item(0).getChildNodes().getLength(); i++) {
Node node = nodeList.item(0).getChildNodes().item(i);
if (node.getNodeType() == Node.ELEMENT_NODE
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java Fri Feb 10 14:28:45 2017
@@ -163,7 +163,7 @@ public class SAMLCallbackHandlerImpl imp
if (customAttributeValues != null) {
attributeBean.setAttributeValues(customAttributeValues);
} else {
- List<Object> attributes = new ArrayList<Object>();
+ List<Object> attributes = new ArrayList<>();
attributes.add("user");
attributeBean.setAttributeValues(attributes);
}
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java Fri Feb 10 14:28:45 2017
@@ -567,7 +567,7 @@ public class SAMLTokenHOKTest extends Ab
securityProperties.getSignatureVerificationCrypto().getX509Certificates(cryptoType)[0]);
httpsTokenSecurityEvent.setSecurityToken(httpsSecurityToken);
- List<SecurityEvent> requestSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> requestSecurityEvents = new ArrayList<>();
requestSecurityEvents.add(httpsTokenSecurityEvent);
XMLStreamReader xmlStreamReader = wsSecIn.processInMessage(
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java Fri Feb 10 14:28:45 2017
@@ -378,7 +378,7 @@ public class SAMLTokenReferenceTest exte
Crypto userCrypto = CryptoFactory.getInstance("receiver-crypto.properties");
builder.prepare(userCrypto);
- List<WSEncryptionPart> parts = new ArrayList<WSEncryptionPart>();
+ List<WSEncryptionPart> parts = new ArrayList<>();
WSEncryptionPart encP =
new WSEncryptionPart(
"add", "http://ws.apache.org/counter/counter_port_type", "Element"
@@ -463,7 +463,7 @@ public class SAMLTokenReferenceTest exte
Crypto userCrypto = CryptoFactory.getInstance("receiver-crypto.properties");
builder.prepare(userCrypto);
- List<WSEncryptionPart> parts = new ArrayList<WSEncryptionPart>();
+ List<WSEncryptionPart> parts = new ArrayList<>();
WSEncryptionPart encP =
new WSEncryptionPart(
"add", "http://ws.apache.org/counter/counter_port_type", "Element"
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenSVTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenSVTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenSVTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenSVTest.java Fri Feb 10 14:28:45 2017
@@ -368,7 +368,7 @@ public class SAMLTokenSVTest extends Abs
securityProperties.getSignatureVerificationCrypto().getX509Certificates(cryptoType)[0]);
httpsTokenSecurityEvent.setSecurityToken(httpsSecurityToken);
- List<SecurityEvent> requestSecurityEvents = new ArrayList<SecurityEvent>();
+ List<SecurityEvent> requestSecurityEvents = new ArrayList<>();
requestSecurityEvents.add(httpsTokenSecurityEvent);
XMLStreamReader xmlStreamReader = wsSecIn.processInMessage(
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java?rev=1782477&r1=1782476&r2=1782477&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java Fri Feb 10 14:28:45 2017
@@ -768,7 +768,7 @@ public class SAMLTokenTest extends Abstr
XSAny attributeValue = xsAnyBuilder.buildObject(AttributeValue.DEFAULT_ELEMENT_NAME);
attributeValue.getUnknownXMLObjects().add(conditions);
- List<Object> attributeValues = new ArrayList<Object>();
+ List<Object> attributeValues = new ArrayList<>();
attributeValues.add(attributeValue);
callbackHandler.setCustomAttributeValues(attributeValues);