http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/external/DomainExpressionBuilderRegistryTest.java ---------------------------------------------------------------------- diff --git a/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/external/DomainExpressionBuilderRegistryTest.java b/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/external/DomainExpressionBuilderRegistryTest.java index 3f38c74..a562cdd 100644 --- a/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/external/DomainExpressionBuilderRegistryTest.java +++ b/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/external/DomainExpressionBuilderRegistryTest.java @@ -69,7 +69,7 @@ public class DomainExpressionBuilderRegistryTest extends Assert { @Test public void testBuild() { DomainExpressionBuilder builder = control.createMock(DomainExpressionBuilder.class); - Map<QName, DomainExpressionBuilder> builders = new HashMap<QName, DomainExpressionBuilder>(); + Map<QName, DomainExpressionBuilder> builders = new HashMap<>(); QName qn = new QName("http://a.b.c", "x"); builders.put(qn, builder); DomainExpressionBuilderRegistry reg = new DomainExpressionBuilderRegistry(builders);
http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/CapturingXMLWriter.java ---------------------------------------------------------------------- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/CapturingXMLWriter.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/CapturingXMLWriter.java index 64127b5..ac62128 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/CapturingXMLWriter.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/CapturingXMLWriter.java @@ -42,7 +42,7 @@ public class CapturingXMLWriter implements XMLStreamWriter { delegate = del; capture = StaxUtils.createXMLStreamWriter(bos, StandardCharsets.UTF_8.name()); - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); map.put("{http://schemas.xmlsoap.org/ws/2005/02/rm}Sequence", ""); map.put("{http://schemas.xmlsoap.org/ws/2005/02/rm}SequenceAcknowledgement", ""); map.put("{http://docs.oasis-open.org/ws-rx/wsrm/200702}Sequence", ""); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java ---------------------------------------------------------------------- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java index 9416769..dd32b16 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java @@ -229,7 +229,7 @@ public class Proxy { OperationInfo oi = reliableEndpoint.getEndpoint(protocol).getEndpointInfo().getService() .getInterface().getOperation(constants.getCloseSequenceOperationName()); // pass reference to source sequence in invocation context - Map<String, Object> context = new HashMap<String, Object>( + Map<String, Object> context = new HashMap<>( Collections.singletonMap(SourceSequence.class.getName(), (Object)s)); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureInInterceptor.java ---------------------------------------------------------------------- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureInInterceptor.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureInInterceptor.java index 83f2391..dce6807 100755 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureInInterceptor.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureInInterceptor.java @@ -221,7 +221,7 @@ public class RMCaptureInInterceptor extends AbstractRMInterceptor<Message> { is = saved.getInputStream(); XMLStreamWriter capture = StaxUtils.createXMLStreamWriter(newSaved, StandardCharsets.UTF_8.name()); - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); map.put("{http://schemas.xmlsoap.org/ws/2005/02/rm}Sequence", ""); map.put("{http://schemas.xmlsoap.org/ws/2005/02/rm}SequenceAcknowledgement", ""); map.put("{http://docs.oasis-open.org/ws-rx/wsrm/200702}Sequence", ""); @@ -229,7 +229,7 @@ public class RMCaptureInInterceptor extends AbstractRMInterceptor<Message> { map.put("{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security", ""); // attributes to be removed - Map<String, String> amap = new HashMap<String, String>(); + Map<String, String> amap = new HashMap<>(); amap.put("{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Id", ""); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java ---------------------------------------------------------------------- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java index 9192afe..94d9719 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java @@ -131,8 +131,8 @@ public class RMEndpoint { destination = new Destination(this); proxy = new Proxy(this); servant = new Servant(this); - services = new HashMap<ProtocolVariation, WrappedService>(); - endpoints = new HashMap<ProtocolVariation, Endpoint>(); + services = new HashMap<>(); + endpoints = new HashMap<>(); applicationMessageCount = new AtomicInteger(); controlMessageCount = new AtomicInteger(); acknowledgementSequence = new AtomicInteger(); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java ---------------------------------------------------------------------- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java index 525c3a8..ecf41f9 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java @@ -472,7 +472,7 @@ public class RMManager { Proxy proxy = source.getReliableEndpoint().getProxy(); ProtocolVariation protocol = config.getProtocolVariation(); Exchange exchange = new ExchangeImpl(); - Map<String, Object> context = new HashMap<String, Object>(16); + Map<String, Object> context = new HashMap<>(16); for (String key : message.getContextualPropertyKeys()) { //copy other properties? if (key.startsWith("ws-security")) { http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Source.java ---------------------------------------------------------------------- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Source.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Source.java index 9798836..88cf9b0 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Source.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Source.java @@ -45,7 +45,7 @@ public class Source extends AbstractEndpoint { Source(RMEndpoint reliableEndpoint) { super(reliableEndpoint); map = new ConcurrentHashMap<String, SourceSequence>(); - current = new HashMap<String, SourceSequence>(); + current = new HashMap<>(); sequenceCreationLock = new ReentrantLock(); sequenceCreationCondition = sequenceCreationLock.newCondition(); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java ---------------------------------------------------------------------- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java index f99809a..a3c35a1 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java @@ -1036,8 +1036,8 @@ public class RMTxStore implements RMStore { return; } // create a statement specific lock table - statementLocks = new HashMap<Statement, Lock>(); - cachedStatements = new HashMap<String, PreparedStatement>(); + statementLocks = new HashMap<>(); + cachedStatements = new HashMap<>(); // create the statements in advance if the connection is to be kept cacheStatement(connection, CREATE_DEST_SEQUENCE_STMT_STR); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RedeliveryQueueImpl.java ---------------------------------------------------------------------- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RedeliveryQueueImpl.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RedeliveryQueueImpl.java index d0e7018..dc8af3a 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RedeliveryQueueImpl.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RedeliveryQueueImpl.java @@ -208,7 +208,7 @@ public class RedeliveryQueueImpl implements RedeliveryQueue { public Map<Long, RetryStatus> getRedeliveryStatuses(DestinationSequence seq) { - Map<Long, RetryStatus> cp = new HashMap<Long, RetryStatus>(); + Map<Long, RetryStatus> cp = new HashMap<>(); List<RedeliverCandidate> sequenceCandidates = getSequenceCandidates(seq); if (null != sequenceCandidates) { for (int i = 0; i < sequenceCandidates.size(); i++) { http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java ---------------------------------------------------------------------- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java index cf6e3b8..668fc61 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java @@ -237,7 +237,7 @@ public class RetransmissionQueueImpl implements RetransmissionQueue { } public Map<Long, RetryStatus> getRetransmissionStatuses(SourceSequence seq) { - Map<Long, RetryStatus> cp = new HashMap<Long, RetryStatus>(); + Map<Long, RetryStatus> cp = new HashMap<>(); List<ResendCandidate> sequenceCandidates = getSequenceCandidates(seq); if (null != sequenceCandidates) { for (int i = 0; i < sequenceCandidates.size(); i++) { http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ManagedRMManagerTest.java ---------------------------------------------------------------------- diff --git a/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ManagedRMManagerTest.java b/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ManagedRMManagerTest.java index dd67252..f845311 100755 --- a/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ManagedRMManagerTest.java +++ b/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ManagedRMManagerTest.java @@ -467,7 +467,7 @@ public class ManagedRMManagerTest extends Assert { private class TestRetransmissionQueue implements RetransmissionQueue { private Set<String> suspended = new HashSet<>(); private RetryStatus status = new TestRetransmissionStatus(); - private Map<String, List<Long>> numlists = new HashMap<String, List<Long>>(); + private Map<String, List<Long>> numlists = new HashMap<>(); TestRetransmissionQueue() { numlists.put("seq1", new ArrayList<>()); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java ---------------------------------------------------------------------- diff --git a/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java b/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java index abf50aa..e6caedc 100644 --- a/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java +++ b/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java @@ -276,7 +276,7 @@ public class ProxyTest extends Assert { EasyMock.expect(proxy.createClient(bus, endpoint, ProtocolVariation.RM10WSA200408, conduit, replyTo)) .andReturn(client).anyTimes(); Object[] args = new Object[] {}; - Map<String, Object> context = new HashMap<String, Object>(); + Map<String, Object> context = new HashMap<>(); Object[] results = new Object[] {"a", "b", "c"}; Exchange exchange = control.createMock(Exchange.class); @@ -368,7 +368,7 @@ public class ProxyTest extends Assert { EasyMock.expect(defaultAcksTo.getAddress()).andReturn(aut).anyTimes(); RelatesToType relatesTo = control.createMock(RelatesToType.class); control.replay(); - Map<String, Object> context = new HashMap<String, Object>(); + Map<String, Object> context = new HashMap<>(); if (isServer) { assertNull(proxy.createSequence(defaultAcksTo, relatesTo, isServer, ProtocolVariation.RM10WSA200408, exchange, context)); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java index 2cfdb8a..68ef33d 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java @@ -268,7 +268,7 @@ public final class WSSecurityPolicyLoader implements PolicyInterceptorProviderLo new QName(SP11Constants.SP_NS, SPConstants.INCLUSIVE_C14N), new QName(SP12Constants.SP_NS, SPConstants.INCLUSIVE_C14N), }); - final Map<QName, Assertion> assertions = new HashMap<QName, Assertion>(); + final Map<QName, Assertion> assertions = new HashMap<>(); for (QName q : others) { assertions.put(q, new PrimitiveAssertion(q)); } http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/DefaultAlgorithmSuiteLoader.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/DefaultAlgorithmSuiteLoader.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/DefaultAlgorithmSuiteLoader.java index 2050b76..e6815be 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/DefaultAlgorithmSuiteLoader.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/DefaultAlgorithmSuiteLoader.java @@ -46,7 +46,7 @@ public class DefaultAlgorithmSuiteLoader implements AlgorithmSuiteLoader { AssertionBuilderRegistry reg = bus.getExtension(AssertionBuilderRegistry.class); if (reg != null) { String ns = "http://cxf.apache.org/custom/security-policy"; - final Map<QName, Assertion> assertions = new HashMap<QName, Assertion>(); + final Map<QName, Assertion> assertions = new HashMap<>(); QName qName = new QName(ns, "Basic128GCM"); assertions.put(qName, new PrimitiveAssertion(qName)); qName = new QName(ns, "Basic192GCM"); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/main/java/org/apache/cxf/ws/security/sts/provider/SecurityTokenServiceProvider.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/sts/provider/SecurityTokenServiceProvider.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/sts/provider/SecurityTokenServiceProvider.java index 6aa54a6..10454dc 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/sts/provider/SecurityTokenServiceProvider.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/sts/provider/SecurityTokenServiceProvider.java @@ -85,7 +85,7 @@ public class SecurityTokenServiceProvider implements Provider<Source> { private static final String WSTRUST_REQUESTTYPE_KEYEXCHANGETOKEN = WSTRUST_13_NAMESPACE + "/KeyExchangeToken"; - private static final Map<String, Method> OPERATION_METHODS = new HashMap<String, Method>(); + private static final Map<String, Method> OPERATION_METHODS = new HashMap<>(); static { try { Method m = IssueOperation.class.getDeclaredMethod("issue", @@ -140,7 +140,7 @@ public class SecurityTokenServiceProvider implements Provider<Source> { private RenewOperation renewOperation; private RequestCollectionOperation requestCollectionOperation; private ValidateOperation validateOperation; - private Map<String, Object> operationMap = new HashMap<String, Object>(); + private Map<String, Object> operationMap = new HashMap<>(); @Resource private WebServiceContext context; http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java index a98b6ef..06407db 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java @@ -202,7 +202,7 @@ public final class STSUtils { basicStsClient.setAllowRenewingAfterExpiry(true); basicStsClient.setEnableLifetime(true); - Map<String, Object> props = new HashMap<String, Object>(); + Map<String, Object> props = new HashMap<>(); if (authParams.getUserName() != null) { props.put(SecurityConstants.USERNAME, authParams.getUserName()); } http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java index c81879a..34d5d76 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java @@ -197,7 +197,7 @@ public abstract class AbstractUsernameTokenAuthenticatingInterceptor extends WSS @Override protected WSSecurityEngine getSecurityEngine(boolean utNoCallbacks) { - Map<QName, Object> profiles = new HashMap<QName, Object>(1); + Map<QName, Object> profiles = new HashMap<>(1); Validator validator = new CustomValidator(); profiles.put(WSConstants.USERNAME_TOKEN, validator); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSerializer.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSerializer.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSerializer.java index 20686c2..2fa4c15 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSerializer.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSerializer.java @@ -66,7 +66,7 @@ public class StaxSerializer extends AbstractSerializer { com.ctc.wstx.sr.InputElementStack ies = (com.ctc.wstx.sr.InputElementStack)nsctx; com.ctc.wstx.util.InternCache ic = com.ctc.wstx.util.InternCache.getInstance(); - Map<String, String> storedNamespaces = new HashMap<String, String>(); + Map<String, String> storedNamespaces = new HashMap<>(); Node wk = ctx; while (wk != null) { NamedNodeMap atts = wk.getAttributes(); @@ -145,7 +145,7 @@ public class StaxSerializer extends AbstractSerializer { outputStreamWriter.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?><dummy"); // Run through each node up to the document node and find any xmlns: nodes - Map<String, String> storedNamespaces = new HashMap<String, String>(); + Map<String, String> storedNamespaces = new HashMap<>(); Node wk = ctx; while (wk != null) { NamedNodeMap atts = wk.getAttributes(); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java index 15d7a82..c023422 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java @@ -581,7 +581,7 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor { } if (!utWithCallbacks) { - Map<QName, Object> profiles = new HashMap<QName, Object>(1); + Map<QName, Object> profiles = new HashMap<>(1); Validator validator = new NoOpValidator(); profiles.put(WSConstants.USERNAME_TOKEN, validator); return createSecurityEngine(profiles); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java index e864b21..04dc2a3 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java @@ -607,7 +607,7 @@ public abstract class AbstractStaxBindingHandler extends AbstractCommonBindingHa boolean endorse ) throws Exception { if (tokenAssertions != null && !tokenAssertions.isEmpty()) { - Map<AbstractToken, SecurePart> ret = new HashMap<AbstractToken, SecurePart>(); + Map<AbstractToken, SecurePart> ret = new HashMap<>(); for (AssertionInfo assertionInfo : tokenAssertions) { if (assertionInfo.getAssertion() instanceof SupportingTokens) { assertionInfo.setAsserted(true); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageCheckerTest.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageCheckerTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageCheckerTest.java index 324be58..283be4a 100644 --- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageCheckerTest.java +++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageCheckerTest.java @@ -199,7 +199,7 @@ public class CryptoCoverageCheckerTest extends AbstractSecurityTest { } private Map<String, String> getPrefixes() { - final Map<String, String> prefixes = new HashMap<String, String>(); + final Map<String, String> prefixes = new HashMap<>(); prefixes.put("ser", "http://www.sdj.pl"); prefixes.put("soap", "http://schemas.xmlsoap.org/soap/envelope/"); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxEncryptionIdentifierTest.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxEncryptionIdentifierTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxEncryptionIdentifierTest.java index 1ca5e75..553bb50 100644 --- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxEncryptionIdentifierTest.java +++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxEncryptionIdentifierTest.java @@ -63,7 +63,7 @@ public class DOMToStaxEncryptionIdentifierTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); properties.put(WSHandlerConstants.ENC_PROP_FILE, "outsecurity.properties"); @@ -96,7 +96,7 @@ public class DOMToStaxEncryptionIdentifierTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); properties.put(WSHandlerConstants.ENC_PROP_FILE, "outsecurity.properties"); @@ -129,7 +129,7 @@ public class DOMToStaxEncryptionIdentifierTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); properties.put(WSHandlerConstants.ENC_PROP_FILE, "outsecurity.properties"); @@ -162,7 +162,7 @@ public class DOMToStaxEncryptionIdentifierTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); properties.put(WSHandlerConstants.ENC_PROP_FILE, "outsecurity.properties"); @@ -195,7 +195,7 @@ public class DOMToStaxEncryptionIdentifierTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); properties.put(WSHandlerConstants.ENC_PROP_FILE, "outsecurity.properties"); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxRoundTripTest.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxRoundTripTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxRoundTripTest.java index 965130b..547526e 100644 --- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxRoundTripTest.java +++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxRoundTripTest.java @@ -65,7 +65,7 @@ public class DOMToStaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN); properties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); @@ -113,7 +113,7 @@ public class DOMToStaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN); properties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); @@ -162,7 +162,7 @@ public class DOMToStaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); properties.put(WSHandlerConstants.ENC_PROP_FILE, "outsecurity.properties"); @@ -194,7 +194,7 @@ public class DOMToStaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); properties.put(WSHandlerConstants.ENC_PROP_FILE, "outsecurity.properties"); @@ -239,7 +239,7 @@ public class DOMToStaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put( WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.ENCRYPT @@ -275,7 +275,7 @@ public class DOMToStaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); properties.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties"); @@ -307,7 +307,7 @@ public class DOMToStaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put( WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.USERNAME_TOKEN @@ -339,7 +339,7 @@ public class DOMToStaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP); WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor(properties); @@ -368,7 +368,7 @@ public class DOMToStaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put( WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE @@ -408,7 +408,7 @@ public class DOMToStaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put( WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE @@ -453,7 +453,7 @@ public class DOMToStaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new KeystorePasswordCallback()); properties.put(WSHandlerConstants.SIG_PROP_FILE, "alice.properties"); @@ -488,7 +488,7 @@ public class DOMToStaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put( WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT @@ -538,7 +538,7 @@ public class DOMToStaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); properties.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties"); @@ -548,7 +548,7 @@ public class DOMToStaxRoundTripTest extends AbstractSecurityTest { WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor(properties); client.getOutInterceptors().add(ohandler); - Map<String, Object> domInProperties = new HashMap<String, Object>(); + Map<String, Object> domInProperties = new HashMap<>(); domInProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE); domInProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); domInProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties"); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxSignatureIdentifierTest.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxSignatureIdentifierTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxSignatureIdentifierTest.java index 15f1426..9038858 100644 --- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxSignatureIdentifierTest.java +++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DOMToStaxSignatureIdentifierTest.java @@ -64,7 +64,7 @@ public class DOMToStaxSignatureIdentifierTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); properties.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties"); @@ -97,7 +97,7 @@ public class DOMToStaxSignatureIdentifierTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); properties.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties"); @@ -130,7 +130,7 @@ public class DOMToStaxSignatureIdentifierTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); properties.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties"); @@ -163,7 +163,7 @@ public class DOMToStaxSignatureIdentifierTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); properties.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties"); @@ -197,7 +197,7 @@ public class DOMToStaxSignatureIdentifierTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE); properties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); properties.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties"); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DefaultCryptoCoverageCheckerTest.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DefaultCryptoCoverageCheckerTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DefaultCryptoCoverageCheckerTest.java index 7c844af..b58747e 100644 --- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DefaultCryptoCoverageCheckerTest.java +++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/DefaultCryptoCoverageCheckerTest.java @@ -85,7 +85,7 @@ public class DefaultCryptoCoverageCheckerTest extends AbstractSecurityTest { } private Map<String, String> getPrefixes() { - final Map<String, String> prefixes = new HashMap<String, String>(); + final Map<String, String> prefixes = new HashMap<>(); prefixes.put("ser", "http://www.sdj.pl"); return prefixes; http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/SecurityActionTokenTest.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/SecurityActionTokenTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/SecurityActionTokenTest.java index fcf133c..7b6d32f 100644 --- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/SecurityActionTokenTest.java +++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/SecurityActionTokenTest.java @@ -84,10 +84,10 @@ public class SecurityActionTokenTest extends AbstractSecurityTest { List<HandlerAction> actions = Collections.singletonList(new HandlerAction(WSConstants.ENCR, actionToken)); - Map<String, Object> outProperties = new HashMap<String, Object>(); + Map<String, Object> outProperties = new HashMap<>(); outProperties.put(WSHandlerConstants.HANDLER_ACTIONS, actions); - Map<String, Object> inProperties = new HashMap<String, Object>(); + Map<String, Object> inProperties = new HashMap<>(); inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT); inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties"); inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java index 4b5925a..8a3617f 100644 --- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java +++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java @@ -103,7 +103,7 @@ public class StaxRoundTripActionTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN); inConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); inConfig.put(ConfigurationConstants.PASSWORD_TYPE, "PasswordText"); @@ -209,7 +209,7 @@ public class StaxRoundTripActionTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT); inConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); inConfig.put(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties"); @@ -224,7 +224,7 @@ public class StaxRoundTripActionTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT); outConfig.put(ConfigurationConstants.ENCRYPTION_USER, "myalias"); outConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); @@ -304,7 +304,7 @@ public class StaxRoundTripActionTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put( ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT + " " + ConfigurationConstants.USERNAME_TOKEN @@ -322,7 +322,7 @@ public class StaxRoundTripActionTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put( ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN + " " + ConfigurationConstants.ENCRYPT @@ -403,7 +403,7 @@ public class StaxRoundTripActionTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE); inConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); inConfig.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties"); @@ -421,7 +421,7 @@ public class StaxRoundTripActionTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE); outConfig.put(ConfigurationConstants.SIGNATURE_USER, "myalias"); outConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); @@ -484,7 +484,7 @@ public class StaxRoundTripActionTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.TIMESTAMP); WSS4JStaxInInterceptor inhandler = new WSS4JStaxInInterceptor(inConfig); @@ -497,7 +497,7 @@ public class StaxRoundTripActionTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.TIMESTAMP); WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig); @@ -559,7 +559,7 @@ public class StaxRoundTripActionTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put( ConfigurationConstants.ACTION, ConfigurationConstants.TIMESTAMP + " " + ConfigurationConstants.SIGNATURE @@ -576,7 +576,7 @@ public class StaxRoundTripActionTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put( ConfigurationConstants.ACTION, ConfigurationConstants.TIMESTAMP + " " + ConfigurationConstants.SIGNATURE @@ -647,7 +647,7 @@ public class StaxRoundTripActionTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put( ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT + " " + ConfigurationConstants.SIGNATURE @@ -666,7 +666,7 @@ public class StaxRoundTripActionTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put( ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT + " " + ConfigurationConstants.SIGNATURE http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java index 6e54151..43ecb83 100644 --- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java +++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java @@ -110,7 +110,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); inConfig.put(ConfigurationConstants.PASSWORD_TYPE, "PasswordText"); WSS4JStaxInInterceptor inhandler = new WSS4JStaxInInterceptor(inConfig); @@ -126,7 +126,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN); outConfig.put(ConfigurationConstants.PASSWORD_TYPE, "PasswordText"); outConfig.put(ConfigurationConstants.USER, "username"); @@ -291,7 +291,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); inConfig.put(ConfigurationConstants.PASSWORD_TYPE, "PasswordDigest"); WSS4JStaxInInterceptor inhandler = new WSS4JStaxInInterceptor(inConfig); @@ -307,7 +307,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN); outConfig.put(ConfigurationConstants.PASSWORD_TYPE, "PasswordDigest"); outConfig.put(ConfigurationConstants.USER, "username"); @@ -458,7 +458,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); inConfig.put(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties"); WSS4JStaxInInterceptor inhandler = new WSS4JStaxInInterceptor(inConfig); @@ -471,7 +471,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT); outConfig.put(ConfigurationConstants.ENCRYPTION_USER, "myalias"); outConfig.put(ConfigurationConstants.ENC_SYM_ALGO, WSSConstants.NS_XENC_AES128); @@ -531,7 +531,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); inConfig.put(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties"); WSS4JStaxInInterceptor inhandler = new WSS4JStaxInInterceptor(inConfig); @@ -544,7 +544,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put( ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN + " " + ConfigurationConstants.ENCRYPT @@ -609,7 +609,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); inConfig.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties"); WSS4JStaxInInterceptor inhandler = new WSS4JStaxInInterceptor(inConfig); @@ -626,7 +626,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE); outConfig.put(ConfigurationConstants.SIGNATURE_USER, "myalias"); outConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); @@ -691,7 +691,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); inConfig.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties"); WSS4JStaxInInterceptor inhandler = new WSS4JStaxInInterceptor(inConfig); @@ -707,7 +707,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put( ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN + " " + ConfigurationConstants.SIGNATURE @@ -760,7 +760,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); WSS4JStaxInInterceptor inhandler = new WSS4JStaxInInterceptor(inConfig); service.getInInterceptors().add(inhandler); @@ -771,7 +771,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.TIMESTAMP); WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig); @@ -828,7 +828,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); inConfig.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties"); WSS4JStaxInInterceptor inhandler = new WSS4JStaxInInterceptor(inConfig); @@ -841,7 +841,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put( ConfigurationConstants.ACTION, ConfigurationConstants.TIMESTAMP + " " + ConfigurationConstants.SIGNATURE @@ -910,7 +910,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); inConfig.put(ConfigurationConstants.SIG_VER_PROP_FILE, "cxfca.properties"); WSS4JStaxInInterceptor inhandler = new WSS4JStaxInInterceptor(inConfig); @@ -926,7 +926,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE); outConfig.put(ConfigurationConstants.SIGNATURE_USER, "alice"); outConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new KeystorePasswordCallback()); @@ -986,7 +986,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); inConfig.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties"); inConfig.put(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties"); @@ -1000,7 +1000,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put( ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT + " " + ConfigurationConstants.SIGNATURE @@ -1082,13 +1082,13 @@ public class StaxRoundTripTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inConfig = new HashMap<String, Object>(); + Map<String, Object> inConfig = new HashMap<>(); inConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); inConfig.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties"); WSS4JStaxInInterceptor inhandler = new WSS4JStaxInInterceptor(inConfig); service.getInInterceptors().add(inhandler); - Map<String, Object> outConfig = new HashMap<String, Object>(); + Map<String, Object> outConfig = new HashMap<>(); outConfig.put( ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE ); @@ -1107,7 +1107,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { client.getInInterceptors().add(new LoggingInInterceptor()); client.getOutInterceptors().add(new LoggingOutInterceptor()); - Map<String, Object> clientOutConfig = new HashMap<String, Object>(); + Map<String, Object> clientOutConfig = new HashMap<>(); clientOutConfig.put( ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE ); @@ -1118,7 +1118,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { client.getOutInterceptors().add(clientOhandler); - Map<String, Object> clientInConfig = new HashMap<String, Object>(); + Map<String, Object> clientInConfig = new HashMap<>(); clientInConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback()); clientInConfig.put(ConfigurationConstants.ENABLE_SIGNATURE_CONFIRMATION, "true"); clientInConfig.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties"); @@ -1154,7 +1154,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest { private static class UnknownUserPasswordCallbackHandler implements CallbackHandler { - private static Map<String, String> passwords = new HashMap<String, String>(); + private static Map<String, String> passwords = new HashMap<>(); static { passwords.put("Alice", "AlicePassword"); http://git-wip-us.apache.org/repos/asf/cxf/blob/885b65d3/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java index ce35321..274f208 100644 --- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java +++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java @@ -52,7 +52,7 @@ public class StaxToDOMEncryptionIdentifierTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inProperties = new HashMap<String, Object>(); + Map<String, Object> inProperties = new HashMap<>(); inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT); inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties"); @@ -91,7 +91,7 @@ public class StaxToDOMEncryptionIdentifierTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inProperties = new HashMap<String, Object>(); + Map<String, Object> inProperties = new HashMap<>(); inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT); inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties"); @@ -130,7 +130,7 @@ public class StaxToDOMEncryptionIdentifierTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inProperties = new HashMap<String, Object>(); + Map<String, Object> inProperties = new HashMap<>(); inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT); inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties"); @@ -169,7 +169,7 @@ public class StaxToDOMEncryptionIdentifierTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inProperties = new HashMap<String, Object>(); + Map<String, Object> inProperties = new HashMap<>(); inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT); inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties"); @@ -209,7 +209,7 @@ public class StaxToDOMEncryptionIdentifierTest extends AbstractSecurityTest { // Create + configure service Service service = createService(); - Map<String, Object> inProperties = new HashMap<String, Object>(); + Map<String, Object> inProperties = new HashMap<>(); inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT); inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback()); inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties");
