cxf git commit: CXF-6882: Implement JAX-RS 2.1 NIO Proposal [Forced Update!]

2016-11-23 Thread reta
Repository: cxf
Updated Branches:
  refs/heads/CXF-6882.nio 9e085f4ee -> 98050b522 (forced update)


CXF-6882: Implement JAX-RS 2.1 NIO Proposal


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/98050b52
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/98050b52
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/98050b52

Branch: refs/heads/CXF-6882.nio
Commit: 98050b522180fc63e82cf2a9be745d0cf49269ad
Parents: 8fc9d78
Author: reta 
Authored: Tue Oct 18 19:44:31 2016 -0400
Committer: reta 
Committed: Wed Nov 23 19:42:16 2016 -0500

--
 .../cxf/cdi/JAXRSCdiResourceExtension.java  |2 +-
 .../cxf/jaxrs/impl/ResponseBuilderImpl.java |   11 +-
 .../jaxrs/nio/DelegatingNioOutputStream.java|   57 +
 .../nio/DelegatingNioServletOutputStream.java   |   61 +
 .../cxf/jaxrs/nio/NioMessageBodyWriter.java |   97 ++
 .../apache/cxf/jaxrs/nio/NioWriteEntity.java|   40 +
 .../org/apache/cxf/jaxrs/nio/NioWriterImpl.java |   68 +
 .../transport/http/AbstractHTTPDestination.java |   23 +-
 .../cxf/systest/jaxrs/nio/NioBookStore.java |   69 +
 .../systest/jaxrs/nio/NioBookStoreServer.java   |   69 +
 .../cxf/systest/jaxrs/nio/NioBookStoreTest.java |   70 +
 .../jaxrs/src/test/resources/files/books.txt| 1270 ++
 12 files changed, 1829 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/98050b52/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
--
diff --git 
a/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
 
b/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
index 97d8e0c..3e9031e 100644
--- 
a/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
+++ 
b/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
@@ -344,7 +344,7 @@ public class JAXRSCdiResourceExtension implements Extension 
{
 
(JAXRSServerFactoryCustomizationExtension)beanManager.getReference(
 extensionBean, 
 extensionBean.getBeanClass(), 
-beanManager.createCreationalContext(extensionBean) 
+createCreationalContext(beanManager, extensionBean) 
 );
 extension.customize(bean);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/98050b52/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
--
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
index 29c5c42..e0f98da 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
@@ -41,6 +41,7 @@ import javax.ws.rs.core.Response.ResponseBuilder;
 import javax.ws.rs.core.UriInfo;
 import javax.ws.rs.core.Variant;
 
+import org.apache.cxf.jaxrs.nio.NioWriteEntity;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.PhaseInterceptorChain;
 
@@ -318,14 +319,14 @@ public class ResponseBuilderImpl extends ResponseBuilder 
implements Cloneable {
 }
 
 @Override
-public ResponseBuilder entity(NioWriterHandler arg0) {
-// TODO: Not Implemented
-return this;
+public ResponseBuilder entity(NioWriterHandler writer) {
+return entity(writer, (throwable) -> {  
+});
 }
 
 @Override
-public ResponseBuilder entity(NioWriterHandler arg0, NioErrorHandler arg1) 
{
-// TODO: Not Implemented
+public ResponseBuilder entity(NioWriterHandler writer, NioErrorHandler 
error) {
+this.entity = new NioWriteEntity(writer, error);
 return this;
 }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/98050b52/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/nio/DelegatingNioOutputStream.java
--
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/nio/DelegatingNioOutputStream.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/nio/DelegatingNioOutputStream.java
new file mode 100644
index 000..29e05e1
--- /dev/null
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/nio/DelegatingNioOutputStream.java
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ 

cxf git commit: CXF-6882: Implement JAX-RS 2.1 NIO Proposal

2016-11-23 Thread reta
Repository: cxf
Updated Branches:
  refs/heads/CXF-6882.nio [created] 9e085f4ee


CXF-6882: Implement JAX-RS 2.1 NIO Proposal


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/9e085f4e
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/9e085f4e
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/9e085f4e

Branch: refs/heads/CXF-6882.nio
Commit: 9e085f4ee4aedaf7dbfde8fdbe5fa1aaaf2f4c86
Parents: 8fc9d78
Author: reta 
Authored: Tue Oct 18 19:44:31 2016 -0400
Committer: reta 
Committed: Wed Nov 23 19:34:28 2016 -0500

--
 .../cxf/cdi/JAXRSCdiResourceExtension.java  |2 +-
 .../cxf/jaxrs/impl/ResponseBuilderImpl.java |   11 +-
 .../jaxrs/nio/DelegatingNioOutputStream.java|   47 +
 .../nio/DelegatingNioServletOutputStream.java   |   61 +
 .../cxf/jaxrs/nio/NioMessageBodyWriter.java |   97 ++
 .../apache/cxf/jaxrs/nio/NioWriteEntity.java|   40 +
 .../org/apache/cxf/jaxrs/nio/NioWriterImpl.java |   68 +
 .../transport/http/AbstractHTTPDestination.java |   23 +-
 .../cxf/systest/jaxrs/nio/NioBookStore.java |   69 +
 .../systest/jaxrs/nio/NioBookStoreServer.java   |   69 +
 .../cxf/systest/jaxrs/nio/NioBookStoreTest.java |   70 +
 .../jaxrs/src/test/resources/files/books.txt| 1270 ++
 12 files changed, 1819 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/9e085f4e/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
--
diff --git 
a/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
 
b/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
index 97d8e0c..3e9031e 100644
--- 
a/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
+++ 
b/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
@@ -344,7 +344,7 @@ public class JAXRSCdiResourceExtension implements Extension 
{
 
(JAXRSServerFactoryCustomizationExtension)beanManager.getReference(
 extensionBean, 
 extensionBean.getBeanClass(), 
-beanManager.createCreationalContext(extensionBean) 
+createCreationalContext(beanManager, extensionBean) 
 );
 extension.customize(bean);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/9e085f4e/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
--
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
index 29c5c42..e0f98da 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
@@ -41,6 +41,7 @@ import javax.ws.rs.core.Response.ResponseBuilder;
 import javax.ws.rs.core.UriInfo;
 import javax.ws.rs.core.Variant;
 
+import org.apache.cxf.jaxrs.nio.NioWriteEntity;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.PhaseInterceptorChain;
 
@@ -318,14 +319,14 @@ public class ResponseBuilderImpl extends ResponseBuilder 
implements Cloneable {
 }
 
 @Override
-public ResponseBuilder entity(NioWriterHandler arg0) {
-// TODO: Not Implemented
-return this;
+public ResponseBuilder entity(NioWriterHandler writer) {
+return entity(writer, (throwable) -> {  
+});
 }
 
 @Override
-public ResponseBuilder entity(NioWriterHandler arg0, NioErrorHandler arg1) 
{
-// TODO: Not Implemented
+public ResponseBuilder entity(NioWriterHandler writer, NioErrorHandler 
error) {
+this.entity = new NioWriteEntity(writer, error);
 return this;
 }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/9e085f4e/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/nio/DelegatingNioOutputStream.java
--
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/nio/DelegatingNioOutputStream.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/nio/DelegatingNioOutputStream.java
new file mode 100644
index 000..e7fbf51
--- /dev/null
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/nio/DelegatingNioOutputStream.java
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the 

cxf-fediz git commit: Findbugs work on the Fediz services

2016-11-23 Thread coheigea
Repository: cxf-fediz
Updated Branches:
  refs/heads/1.2.x-fixes f1159f3a7 -> 94d12ade2


Findbugs work on the Fediz services


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/94d12ade
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/94d12ade
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/94d12ade

Branch: refs/heads/1.2.x-fixes
Commit: 94d12ade2cc8c0325350519f7e0302734a9e5f62
Parents: f1159f3
Author: Colm O hEigeartaigh 
Authored: Wed Nov 23 13:31:31 2016 +
Committer: Colm O hEigeartaigh 
Committed: Wed Nov 23 16:57:16 2016 +

--
 .../fediz/service/idp/FederationEntryPoint.java |  3 +-
 .../service/idp/STSAuthenticationProvider.java  |  2 +-
 .../idp/STSKrbAuthenticationProvider.java   |  5 ++
 .../cxf/fediz/service/idp/STSUserDetails.java   | 24 +
 .../service/idp/beans/CommonsURLValidator.java  | 52 
 .../service/idp/beans/STSClientAction.java  |  2 +-
 .../kerberos/KerberosServiceRequestToken.java   | 17 +--
 .../idp/kerberos/PassThroughKerberosClient.java | 13 -
 .../ApplicationProtocolControllerImpl.java  |  2 +-
 .../fediz/service/idp/rest/IdpServiceImpl.java  | 25 ++
 .../WEB-INF/federation-signin-request.xml   |  2 +-
 .../WEB-INF/federation-validate-request.xml |  6 +++
 .../fediz/service/sts/FileClaimsHandler.java|  2 +-
 .../sts/realms/RealmFileClaimsHandler.java  |  2 +-
 14 files changed, 136 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/94d12ade/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FederationEntryPoint.java
--
diff --git 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FederationEntryPoint.java
 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FederationEntryPoint.java
index 1a39ef2..b73dfd8 100644
--- 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FederationEntryPoint.java
+++ 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FederationEntryPoint.java
@@ -96,7 +96,8 @@ public class FederationEntryPoint implements 
AuthenticationEntryPoint,
 if (loginUri == null) {
 LOG.warn("wauth value '" + wauth + "' not supported");
 response.sendError(
-HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "wauth value 
'" + wauth + "' not supported");
+HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "The wauth 
value that was supplied is not supported");
+return;
 }
 redirectUrl = new StringBuilder(extractFullContextPath(servletRequest))
 
.append(loginUri).append("?").append(servletRequest.getQueryString()).toString();

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/94d12ade/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
--
diff --git 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
index ab84b11..c53604d 100644
--- 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
+++ 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
@@ -92,7 +92,7 @@ public abstract class STSAuthenticationProvider implements 
AuthenticationProvide
 
 List claims = parseClaimsInAssertion(assertion.getSaml2());
 for (Claim c : claims) {
-if (roleURI.equals(c.getClaimType())) {
+if (c.getClaimType() != null && 
roleURI.equals(c.getClaimType().toString())) {
 Object oValue = c.getValue();
 if ((oValue instanceof List) && 
!((List)oValue).isEmpty()) {
 List values = (List)oValue;

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/94d12ade/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
--
diff --git 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
index 9a5dae8..62f4817 100644
--- 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
+++ 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
@@ -132,6 +132,11 @@ public class STSKrbAuthenticationProvider extends 
STSAuthenticationProvider {
 new SAMLTokenP

[3/6] cxf git commit: Fix random test failure (methods can return in any order)

2016-11-23 Thread dkulp
Fix random test failure (methods can return in any order)


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b72bf00a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b72bf00a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b72bf00a

Branch: refs/heads/3.1.x-fixes
Commit: b72bf00a4686d14d3727840593b25ce0578948e8
Parents: 55f92f4
Author: Daniel Kulp 
Authored: Wed Nov 23 09:10:04 2016 -0500
Committer: Daniel Kulp 
Committed: Wed Nov 23 10:52:09 2016 -0500

--
 .../org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java   | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/b72bf00a/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
--
diff --git 
a/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
 
b/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
index 37e1130..2e7581f 100644
--- 
a/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
+++ 
b/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
@@ -435,6 +435,11 @@ public class JAXRSContainerTest extends ProcessorTestBase {
 Method[] test1Methods = test1.getDeclaredMethods();
 assertEquals(2, test1Methods.length);
 assertEquals(2, test1Methods[0].getAnnotations().length);
+if ("getGetaddmethod2".equals(test1Methods[0].getName())) {
+Method tmp = test1Methods[0];
+test1Methods[0] = test1Methods[1];
+test1Methods[1] = tmp;
+}
 checkComplexPathMethod(test1Methods[0], "");
 checkComplexPathMethod(test1Methods[1], "2");
 } catch (Exception e) {



[5/6] cxf git commit: Fix checkstyle issues in samples

2016-11-23 Thread dkulp
Fix checkstyle issues in samples

# Conflicts:
#   
distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/SparkUtils.java
#   
distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/Server.java
#   
distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/StreamingService.java


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a8f1f095
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a8f1f095
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a8f1f095

Branch: refs/heads/3.1.x-fixes
Commit: a8f1f095ecddd639d1496c1fa6189ebf2e371716
Parents: 2164a19
Author: Daniel Kulp 
Authored: Wed Nov 23 09:39:03 2016 -0500
Committer: Daniel Kulp 
Committed: Wed Nov 23 10:53:07 2016 -0500

--
 .../src/main/java/sample/rs/service/SampleRestApplication.java  | 5 +++--
 .../src/main/java/registry/eureka/RegistryApplication.java  | 4 ++--
 .../src/main/java/sample/ws/SampleWsApplicationClient.java  | 4 +++-
 3 files changed, 8 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/a8f1f095/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java
 
b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java
index e146a7f..35bf34a 100644
--- 
a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java
+++ 
b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java
@@ -19,6 +19,8 @@
 package sample.rs.service;
 import java.util.Collections;
 
+import com.codahale.metrics.MetricRegistry;
+
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.actuate.endpoint.MetricReaderPublicMetrics;
 import org.springframework.boot.actuate.endpoint.MetricsEndpoint;
@@ -27,13 +29,12 @@ import 
org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 import org.springframework.context.annotation.Bean;
 
-import com.codahale.metrics.MetricRegistry;
 
 @SpringBootApplication
 @EnableEurekaClient
 public class SampleRestApplication {
 @Bean
-public MetricRegistry metricRegistry(){
+public MetricRegistry metricRegistry() {
 return new MetricRegistry();
 }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/a8f1f095/distribution/src/main/release/samples/jax_rs/spring_boot_scan/eureka-registry/src/main/java/registry/eureka/RegistryApplication.java
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/eureka-registry/src/main/java/registry/eureka/RegistryApplication.java
 
b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/eureka-registry/src/main/java/registry/eureka/RegistryApplication.java
index 0cbdc6e..b38ed90 100644
--- 
a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/eureka-registry/src/main/java/registry/eureka/RegistryApplication.java
+++ 
b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/eureka-registry/src/main/java/registry/eureka/RegistryApplication.java
@@ -22,12 +22,12 @@ import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
 
+//CHECKSTYLE:OFF
 @SpringBootApplication
 @EnableEurekaServer
-//CHECKSTYLE:OFF
 public class RegistryApplication {
-//CHECKSTYLE:ON
 public static void main(String[] args) {
 SpringApplication.run(RegistryApplication.class, args);
 }
 }
+//CHECKSTYLE:ON

http://git-wip-us.apache.org/repos/asf/cxf/blob/a8f1f095/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws/SampleWsApplicationClient.java
--
diff --git 
a/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws/SampleWsApplicationClient.java
 
b/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws/SampleWsApplicationClient.java
index 76f4611..15ea971 100644
--- 
a/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws/SampleWsApplicationClient.java
+++ 
b/distribution/src/main/release/samples/jaxws_spring_boot/

[4/6] cxf git commit: Fix build failure due to dependency name/version for servlet-api

2016-11-23 Thread dkulp
Fix build failure due to dependency name/version for servlet-api


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/2164a191
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2164a191
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2164a191

Branch: refs/heads/3.1.x-fixes
Commit: 2164a191dfa9db0d9a2a8f38efcbfd953f5679d3
Parents: b72bf00
Author: Daniel Kulp 
Authored: Wed Nov 23 09:10:27 2016 -0500
Committer: Daniel Kulp 
Committed: Wed Nov 23 10:52:44 2016 -0500

--
 distribution/src/main/release/samples/oauth/client/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/2164a191/distribution/src/main/release/samples/oauth/client/pom.xml
--
diff --git a/distribution/src/main/release/samples/oauth/client/pom.xml 
b/distribution/src/main/release/samples/oauth/client/pom.xml
index 6db4c0c..d73a0ba 100644
--- a/distribution/src/main/release/samples/oauth/client/pom.xml
+++ b/distribution/src/main/release/samples/oauth/client/pom.xml
@@ -84,8 +84,8 @@
 20100527
 
 
-org.apache.geronimo.specs
-geronimo-servlet_3.0_spec
+javax.servlet
+javax.servlet-api
 
 
 standard



[2/6] cxf git commit: Get the HTTPSProxyAuthConduitTest working java8 update 112+

2016-11-23 Thread dkulp
Get the HTTPSProxyAuthConduitTest working java8 update 112+


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/55f92f4c
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/55f92f4c
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/55f92f4c

Branch: refs/heads/3.1.x-fixes
Commit: 55f92f4c2c750f13e231482466181eb4bcfdcc74
Parents: 826c962
Author: Daniel Kulp 
Authored: Fri Nov 18 13:40:19 2016 -0500
Committer: Daniel Kulp 
Committed: Wed Nov 23 10:52:07 2016 -0500

--
 systests/transports/pom.xml   | 3 +++
 .../cxf/systest/https/conduit/HTTPSProxyAuthConduitTest.java  | 1 +
 2 files changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/55f92f4c/systests/transports/pom.xml
--
diff --git a/systests/transports/pom.xml b/systests/transports/pom.xml
index b620969..8136272 100644
--- a/systests/transports/pom.xml
+++ b/systests/transports/pom.xml
@@ -30,6 +30,9 @@
 Apache CXF Transport System Tests
 Apache CXF Transport System Tests
 http://cxf.apache.org
+
+
-Djdk.http.auth.tunneling.disabledSchemes=""
+
 
 ${basedir}/src/test/java
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/55f92f4c/systests/transports/src/test/java/org/apache/cxf/systest/https/conduit/HTTPSProxyAuthConduitTest.java
--
diff --git 
a/systests/transports/src/test/java/org/apache/cxf/systest/https/conduit/HTTPSProxyAuthConduitTest.java
 
b/systests/transports/src/test/java/org/apache/cxf/systest/https/conduit/HTTPSProxyAuthConduitTest.java
index 82369df..3aac4cd 100644
--- 
a/systests/transports/src/test/java/org/apache/cxf/systest/https/conduit/HTTPSProxyAuthConduitTest.java
+++ 
b/systests/transports/src/test/java/org/apache/cxf/systest/https/conduit/HTTPSProxyAuthConduitTest.java
@@ -73,6 +73,7 @@ public class HTTPSProxyAuthConduitTest extends 
HTTPSConduitTest {
 
 @BeforeClass
 public static void startProxy() {
+System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
 proxy = new DefaultHttpProxyServer(PROXY_PORT, requestFilter, new 
HashMap());
 proxy.addProxyAuthenticationHandler(new ProxyAuthorizationHandler() {
 public boolean authenticate(String userName, String password) {



[1/6] cxf git commit: Remove a bunch of redundant final modifiers (flagged by new Checkstyle plugin in eclipse)

2016-11-23 Thread dkulp
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 9deb2d179 -> b9431024b


Remove a bunch of redundant final modifiers (flagged by new Checkstyle plugin 
in eclipse)

# Conflicts:
#   
integration/cdi/src/main/java/org/apache/cxf/cdi/extension/JAXRSServerFactoryCustomizationExtension.java
#   
rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsHeaders.java


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/826c9625
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/826c9625
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/826c9625

Branch: refs/heads/3.1.x-fixes
Commit: 826c9625710b4aac2a3d5bacd3858b57de5e0955
Parents: 9deb2d1
Author: Daniel Kulp 
Authored: Fri Nov 18 10:46:45 2016 -0500
Committer: Daniel Kulp 
Committed: Wed Nov 23 10:51:44 2016 -0500

--
 .../java/org/apache/cxf/service/invoker/AbstractInvoker.java   | 2 +-
 .../apache/cxf/validation/AbstractValidationInterceptor.java   | 4 ++--
 .../org/apache/cxf/common/injection/ResourceInjectorTest.java  | 6 +++---
 .../client/service/settings/RemoteStorageProxyImpl.java| 6 +++---
 .../src/main/java/org/apache/cxf/tracing/Traceable.java| 2 +-
 .../src/main/java/org/apache/cxf/tracing/TracerContext.java| 6 +++---
 .../java/org/apache/cxf/rs/security/jose/jws/JwsHeaders.java   | 2 +-
 .../transport/https/httpclient/PublicSuffixMatcherLoader.java  | 4 ++--
 .../main/java/org/apache/cxf/wsdl/WSDLExtensibilityPlugin.java | 4 ++--
 .../java/org/apache/cxf/systest/jaxrs/tracing/BookStore.java   | 2 +-
 .../cxf/systest/jaxrs/tracing/htrace/HTraceTracingTest.java| 4 ++--
 .../java/org/apache/cxf/systest/jaxws/tracing/BookStore.java   | 2 +-
 .../cxf/systest/jaxws/tracing/htrace/HTraceTracingTest.java| 4 ++--
 .../java/org/apache/cxf/systest/schemaimport/TestEndpoint.java | 2 +-
 .../org/apache/cxf/tools/wsdlto/core/AbstractGenerator.java| 2 +-
 .../org/apache/cxf/tools/misc/processor/address/Address.java   | 4 ++--
 16 files changed, 28 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/826c9625/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
--
diff --git 
a/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java 
b/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
index e348c80..f201571 100644
--- a/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
+++ b/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
@@ -203,7 +203,7 @@ public abstract class AbstractInvoker implements Invoker {
 /**
  * Creates and returns a service object depending on the scope.
  */
-public abstract Object getServiceObject(final Exchange context);
+public abstract Object getServiceObject(Exchange context);
 
 /**
  * Called when the invoker is done with the object.   Default 
implementation

http://git-wip-us.apache.org/repos/asf/cxf/blob/826c9625/core/src/main/java/org/apache/cxf/validation/AbstractValidationInterceptor.java
--
diff --git 
a/core/src/main/java/org/apache/cxf/validation/AbstractValidationInterceptor.java
 
b/core/src/main/java/org/apache/cxf/validation/AbstractValidationInterceptor.java
index 00b6dc3..266d2c9 100644
--- 
a/core/src/main/java/org/apache/cxf/validation/AbstractValidationInterceptor.java
+++ 
b/core/src/main/java/org/apache/cxf/validation/AbstractValidationInterceptor.java
@@ -108,8 +108,8 @@ public abstract class AbstractValidationInterceptor extends 
AbstractPhaseInterce
 return method;
 }
 
-protected abstract void handleValidation(final Message message, final 
Object resourceInstance,
- final Method method, final 
List arguments);
+protected abstract void handleValidation(Message message, Object 
resourceInstance,
+ Method method, List 
arguments);
 
 
 protected BeanValidationProvider getProvider(Message message) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/826c9625/core/src/test/java/org/apache/cxf/common/injection/ResourceInjectorTest.java
--
diff --git 
a/core/src/test/java/org/apache/cxf/common/injection/ResourceInjectorTest.java 
b/core/src/test/java/org/apache/cxf/common/injection/ResourceInjectorTest.java
index d03ba5f..4736663 100644
--- 
a/core/src/test/java/org/apache/cxf/common/injection/ResourceInjectorTest.java
+++ 
b/core/src/test/java/org/apache/cxf/common/injection/ResourceInjectorTest.java
@@ -225,9 +225,9 @@ class SubSetterTarget extends SetterTarget {
 }
 
 interfac

[6/6] cxf git commit: Recording .gitmergeinfo Changes

2016-11-23 Thread dkulp
Recording .gitmergeinfo Changes


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b9431024
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b9431024
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b9431024

Branch: refs/heads/3.1.x-fixes
Commit: b9431024bcc3e244a220489e7f101adde6380a86
Parents: a8f1f09
Author: Daniel Kulp 
Authored: Wed Nov 23 10:53:07 2016 -0500
Committer: Daniel Kulp 
Committed: Wed Nov 23 10:53:07 2016 -0500

--
 .gitmergeinfo | 11 +++
 1 file changed, 11 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/b9431024/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 5acca72..4e20f07 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -54,6 +54,7 @@ B 517ef67f1a69d386de44153e5e09d51cb47bf4d7
 B 519a67dfa240471bb585929f263cd85051a9eb06
 B 53a46205871434d8c47ed45822e078e5ad6d2c60
 B 54910695917fb63a11982a8dc96a3b4d088963c5
+B 54b71171e89bb1be7d169ac91bb626c9c1ca293b
 B 56dab42caaf27e3bedf08cbb419d3644aeccb7af
 B 57cb5447341949836b7d8cc8f00ca3ced68622f1
 B 584df3ae111595da1b44ccd9db9567c2172bbb2e
@@ -151,6 +152,7 @@ B f66dea949bdc3f136084115aca4e514bad426380
 B f94e1dd9b2a8d27ec5a27bfb7c026e3ae2350e39
 B f98785bd8490c4717353f1a9688cae3e7a823ec2
 B fb30f8bffc85fcc3208fcc0e1eda4b54a89b5d37
+M 01cd14ce923f1f2cd044746e272b2d525c46f9a6
 M 01d06cee06203b0ba616ca1924f1878aecc1a791
 M 0222768baf6b60742c4a8332308edf2be0f4a2e4
 M 055f1d738016ae5caf3eba42e656782de8490890
@@ -173,6 +175,7 @@ M 366a556210a1a7b047c4b4dd8da4fc74af6bd301
 M 386805560479b35276d88605c5acf805e3004aa5
 M 39c772a0764b323f98ab58e00345f4fca924c425
 M 3a1fa0b23f1778594b6339dfcfbc90dcc43a87d4
+M 3be9aac26a003ef43995054da875ffd5fa5a2eb4
 M 3e30d8892a723adcf04268efd7d407e164607065
 M 45d54d558625236b84752b0d7976f0cf85518c16
 M 47691ae5c2c6528d95795a51e98e02b54a033c88
@@ -182,12 +185,16 @@ M 4b0868a8ee6f53d8543860a458821c35ec2a79a2
 M 4f4ce80ba2de80219e13943cbd6edbf47234
 M 574b2a9997c94011794fa2e083181e23c9936f15
 M 585df048b7730ee36644a4bb7c1a20fcf977d79e
+M 5b7b014cc1d24cba1191bc07fd48b13dbf4d4391
+M 5cff82c735c7543ce6dfb6c52ac72f583dbb5d22
 M 6242c682dfce4a2ba4869978c28b14f1472484c1
 M 63a1088a9253da0452497440e900d35a5415c3c9
 M 6becb31c62ef0845a5078f4ec2124fe7bc264e58
 M 7304dfbd8f3044d8d46981abf2058c6cb732d219
 M 746914a5084f5db8d0c0f052802c7ef2217b9b6b
 M 7690a1fd087aff24ad8e8e1ab2e0722e24bf3d81
+M 804a957eb4225a1eaf65399881cdcd8552c00f52
+M 80ca2370616c28b036c54c95af84ca62f1725a30
 M 8118c5a301f22dea16c9d235ad378584a0ae2466
 M 8583a24ac541dc373503d7a6c59cd90890acdae3
 M 86667619dc61c8a84672fc5a583b4517f48176c5
@@ -197,6 +204,8 @@ M 8e131133c8566a124605cb06e0b6db98fddb5972
 M 8e650cfe3efd63a06c25b7e912d9d4db61598eb1
 M 8f8e587cde7ec97410da6b0586810ccf8f0f3233
 M 8fbf0941ca52aac406b3efcf2e0d73436c72d0f1
+M 8fc9d782901adddf874fe7c2f9500836a0585707
+M 910f37767518832cce843c2a093ee833b7c48916
 M 91bb2a18f4653f997e455c5089e7a009310591c6
 M 955fd4b7fee79642934a828b7758ce14f783364a
 M 9a9e0a8a37608195c4ef6fbf386728d13d025d2d
@@ -215,6 +224,7 @@ M b624c034c5682b54b9faf3d3e90eb0c23cde1a5b
 M c01c68ddda10ec6db492b86d818498bec0bf4228
 M c212240f696e3387df19bbcf22d1851aff320078
 M cf8ac102e728b8745da265ec969f7b5160829fdb
+M d46818bd3043d211774de9bc531849f54bb2989f
 M dba09f00804cc05d943fd95d34882d6368c28edb
 M ded06c40ba057981e003903faa93beb94cbe11fa
 M df3854cefae5d2da71f8d222a86218e81df7bd05
@@ -226,5 +236,6 @@ M f462c797eab75e9b6c6c352b4baeb84429866068
 M f7f017f2187d59369a7b94bb053f1e297972dce7
 M f9a42a528f4edfa7bcc62d5885eebaeb25224cec
 M fa973bd7ab43099151f83beea351b80c7140eaab
+M faf461150f178f7f7ae89a3b7c345671e53b8b04
 M fd6689948bc7ad153ccfd7f64554eafbf64b20d6
 M fe89bf0fb8379428667f66312e6942e906142d6f



cxf-fediz git commit: Findbugs work on the Fediz services

2016-11-23 Thread coheigea
Repository: cxf-fediz
Updated Branches:
  refs/heads/1.3.x-fixes e7e1455db -> 9958f08ff


Findbugs work on the Fediz services


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/9958f08f
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/9958f08f
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/9958f08f

Branch: refs/heads/1.3.x-fixes
Commit: 9958f08fff62c65b77b459ef96220e13d895d37b
Parents: e7e1455
Author: Colm O hEigeartaigh 
Authored: Wed Nov 23 13:31:31 2016 +
Committer: Colm O hEigeartaigh 
Committed: Wed Nov 23 16:25:13 2016 +

--
 .../cxf/fediz/service/idp/FedizEntryPoint.java  |  3 +-
 .../service/idp/STSAuthenticationProvider.java  |  2 +-
 .../idp/STSKrbAuthenticationProvider.java   |  5 ++
 .../cxf/fediz/service/idp/STSUserDetails.java   | 24 +
 .../service/idp/beans/CommonsURLValidator.java  | 52 
 .../idp/beans/PassiveRequestorValidator.java| 10 
 .../service/idp/beans/STSClientAction.java  |  2 +-
 .../kerberos/KerberosServiceRequestToken.java   | 17 +--
 .../idp/kerberos/PassThroughKerberosClient.java | 13 -
 .../ApplicationProtocolControllerImpl.java  |  2 +-
 .../fediz/service/idp/rest/IdpServiceImpl.java  | 25 ++
 .../WEB-INF/flows/federation-signin-request.xml |  3 +-
 .../flows/federation-validate-request.xml   |  8 ++-
 .../oidc/clients/ClientRegistrationService.java |  4 +-
 .../fediz/service/sts/FileClaimsHandler.java|  2 +-
 .../sts/realms/RealmFileClaimsHandler.java  |  2 +-
 16 files changed, 140 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/9958f08f/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FedizEntryPoint.java
--
diff --git 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FedizEntryPoint.java
 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FedizEntryPoint.java
index ea594d3..d266f3c 100644
--- 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FedizEntryPoint.java
+++ 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FedizEntryPoint.java
@@ -95,7 +95,8 @@ public class FedizEntryPoint implements 
AuthenticationEntryPoint,
 if (loginUri == null) {
 LOG.warn("wauth value '" + wauth + "' not supported");
 response.sendError(
-HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "wauth value 
'" + wauth + "' not supported");
+HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "The wauth 
value that was supplied is not supported");
+return;
 }
 redirectUrl = new StringBuilder(extractFullContextPath(servletRequest))
 
.append(loginUri).append("?").append(servletRequest.getQueryString()).toString();

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/9958f08f/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
--
diff --git 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
index dd30a4a..9938b7d 100644
--- 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
+++ 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
@@ -92,7 +92,7 @@ public abstract class STSAuthenticationProvider implements 
AuthenticationProvide
 
 List claims = parseClaimsInAssertion(assertion.getSaml2());
 for (Claim c : claims) {
-if (roleURI.equals(c.getClaimType())) {
+if (c.getClaimType() != null && 
roleURI.equals(c.getClaimType().toString())) {
 Object oValue = c.getValue();
 if ((oValue instanceof List) && 
!((List)oValue).isEmpty()) {
 List values = (List)oValue;

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/9958f08f/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
--
diff --git 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
index 9a5dae8..62f4817 100644
--- 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
+++ 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
@@ -132,6 +132,11 @@ public class STSKrbAuthentic

[1/4] cxf git commit: Fix checkstyle issues in samples

2016-11-23 Thread dkulp
Repository: cxf
Updated Branches:
  refs/heads/master d9e2a6e72 -> 8fc9d7829


Fix checkstyle issues in samples


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8fc9d782
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8fc9d782
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8fc9d782

Branch: refs/heads/master
Commit: 8fc9d782901adddf874fe7c2f9500836a0585707
Parents: 54b7117
Author: Daniel Kulp 
Authored: Wed Nov 23 09:39:03 2016 -0500
Committer: Daniel Kulp 
Committed: Wed Nov 23 09:51:40 2016 -0500

--
 .../main/java/demo/jaxrs/server/SparkUtils.java | 10 
 .../java/demo/jaxrs/server/simple/Server.java   |  4 ++--
 .../jaxrs/server/simple/StreamingService.java   | 24 ++--
 .../rs/service/SampleRestApplication.java   |  5 ++--
 .../registry/eureka/RegistryApplication.java|  4 ++--
 .../sample/ws/SampleWsApplicationClient.java|  4 +++-
 6 files changed, 27 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/8fc9d782/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/SparkUtils.java
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/SparkUtils.java
 
b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/SparkUtils.java
index ff29627..98894b4 100644
--- 
a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/SparkUtils.java
+++ 
b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/SparkUtils.java
@@ -47,14 +47,14 @@ public final class SparkUtils {
 public static JavaPairDStream createOutputDStream(
 JavaDStream receiverStream, boolean withId) {
 final JavaDStream words = 
-receiverStream.flatMap(x -> (withId ? splitInputStringWithId(x) : 
splitInputString(x)));
+receiverStream.flatMap(x -> withId ? splitInputStringWithId(x) : 
splitInputString(x));
 
 final JavaPairDStream pairs = words.mapToPair(s -> {
-return new Tuple2(s, 1);
-});
+return new Tuple2(s, 1);
+});
 return pairs.reduceByKey((i1, i2) -> {
-return i1 + i2;
-});
+return i1 + i2;
+});
 }
 public static Iterator splitInputString(String x) {
 List list = new LinkedList();

http://git-wip-us.apache.org/repos/asf/cxf/blob/8fc9d782/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/Server.java
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/Server.java
 
b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/Server.java
index cbe4008..c1a49b2 100644
--- 
a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/Server.java
+++ 
b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/Server.java
@@ -29,8 +29,8 @@ public class Server {
 JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
 sf.setResourceClasses(StreamingService.class);
 
-String receiverType = args.length == 1 && 
args[0].equals("-receiverType=queue") ?
-"queue" : "string";
+String receiverType = args.length == 1 && 
args[0].equals("-receiverType=queue")
+? "queue" : "string";
 sf.setResourceProvider(StreamingService.class, 
 new SingletonResourceProvider(new StreamingService(receiverType)));
 sf.setAddress("http://localhost:9000/spark";);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8fc9d782/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/StreamingService.java
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/StreamingService.java
 
b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/StreamingService.java
index 93dbfb8..ee2eade 100644
--- 
a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/StreamingService.java
+++ 
b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/simple/StreamingService.java
@@ -124,13 +124,13 @@ public class StreamingService {
 
 JavaDStream receiverStream = null;
 if ("queue".equals(receiverType)) {
-   Queue> rddQueue = new LinkedList<>();
-   for (i

[2/4] cxf git commit: Fix build failure due to dependency name/version for servlet-api

2016-11-23 Thread dkulp
Fix build failure due to dependency name/version for servlet-api


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/211302fb
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/211302fb
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/211302fb

Branch: refs/heads/master
Commit: 211302fb106695517b91d4f607644b7a9bda0883
Parents: 7a3f087
Author: Daniel Kulp 
Authored: Wed Nov 23 09:10:27 2016 -0500
Committer: Daniel Kulp 
Committed: Wed Nov 23 09:51:40 2016 -0500

--
 distribution/src/main/release/samples/oauth/client/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/211302fb/distribution/src/main/release/samples/oauth/client/pom.xml
--
diff --git a/distribution/src/main/release/samples/oauth/client/pom.xml 
b/distribution/src/main/release/samples/oauth/client/pom.xml
index c8bec53..83fb288 100644
--- a/distribution/src/main/release/samples/oauth/client/pom.xml
+++ b/distribution/src/main/release/samples/oauth/client/pom.xml
@@ -84,8 +84,8 @@
 20100527
 
 
-org.apache.geronimo.specs
-geronimo-servlet_3.0_spec
+javax.servlet
+javax.servlet-api
 
 
 standard



[4/4] cxf git commit: Fix random test failure (methods can return in any order)

2016-11-23 Thread dkulp
Fix random test failure (methods can return in any order)


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7a3f087a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7a3f087a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7a3f087a

Branch: refs/heads/master
Commit: 7a3f087afcf8bf8e0c111ff601bacf04bb4e32fa
Parents: d9e2a6e
Author: Daniel Kulp 
Authored: Wed Nov 23 09:10:04 2016 -0500
Committer: Daniel Kulp 
Committed: Wed Nov 23 09:51:40 2016 -0500

--
 .../org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java   | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/7a3f087a/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
--
diff --git 
a/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
 
b/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
index 37e1130..2e7581f 100644
--- 
a/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
+++ 
b/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
@@ -435,6 +435,11 @@ public class JAXRSContainerTest extends ProcessorTestBase {
 Method[] test1Methods = test1.getDeclaredMethods();
 assertEquals(2, test1Methods.length);
 assertEquals(2, test1Methods[0].getAnnotations().length);
+if ("getGetaddmethod2".equals(test1Methods[0].getName())) {
+Method tmp = test1Methods[0];
+test1Methods[0] = test1Methods[1];
+test1Methods[1] = tmp;
+}
 checkComplexPathMethod(test1Methods[0], "");
 checkComplexPathMethod(test1Methods[1], "2");
 } catch (Exception e) {



[3/4] cxf git commit: Update to not pull in jaxb-impl and use the in-jre version by default

2016-11-23 Thread dkulp
Update to not pull in jaxb-impl and use the in-jre version by default


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/54b71171
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/54b71171
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/54b71171

Branch: refs/heads/master
Commit: 54b71171e89bb1be7d169ac91bb626c9c1ca293b
Parents: 211302f
Author: Daniel Kulp 
Authored: Wed Nov 23 09:11:03 2016 -0500
Committer: Daniel Kulp 
Committed: Wed Nov 23 09:51:40 2016 -0500

--
 rt/databinding/jaxb/pom.xml  | 8 
 .../test/java/org/apache/cxf/jaxb/JAXBDataBindingTest.java   | 4 
 rt/frontend/simple/pom.xml   | 1 +
 .../java/org/apache/cxf/systest/jaxws/ClientServerTest.java  | 7 ++-
 4 files changed, 7 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/54b71171/rt/databinding/jaxb/pom.xml
--
diff --git a/rt/databinding/jaxb/pom.xml b/rt/databinding/jaxb/pom.xml
index 7556d26..a27348b 100644
--- a/rt/databinding/jaxb/pom.xml
+++ b/rt/databinding/jaxb/pom.xml
@@ -97,14 +97,6 @@
 ${project.version}
 
 
-com.sun.xml.bind
-jaxb-impl
-
-
-com.sun.xml.bind
-jaxb-core
-
-
 ${cxf.asm.groupId}
 ${cxf.asm.artifactId}
 true

http://git-wip-us.apache.org/repos/asf/cxf/blob/54b71171/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBDataBindingTest.java
--
diff --git 
a/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBDataBindingTest.java
 
b/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBDataBindingTest.java
index 980f2de..0251d22 100644
--- 
a/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBDataBindingTest.java
+++ 
b/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBDataBindingTest.java
@@ -277,10 +277,6 @@ public class JAXBDataBindingTest extends Assert {
 public void testDeclaredNamespaceMappingInternal() throws Exception {
 doNamespaceMappingTest(true, true);
 }
-@Test
-public void testDeclaredNamespaceMappingRINoAsm() throws Exception {
-doNamespaceMappingTest(false, false);
-}
 
 @Test
 public void testDeclaredNamespaceMappingInternalNoAsm() throws Exception {

http://git-wip-us.apache.org/repos/asf/cxf/blob/54b71171/rt/frontend/simple/pom.xml
--
diff --git a/rt/frontend/simple/pom.xml b/rt/frontend/simple/pom.xml
index 1f8af0e..89b5214 100644
--- a/rt/frontend/simple/pom.xml
+++ b/rt/frontend/simple/pom.xml
@@ -136,6 +136,7 @@
 com.sun.xml.bind
 jaxb-xjc
 true
+provided
 
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/54b71171/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
--
diff --git 
a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
 
b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
index 7bece33..be0b0bb 100644
--- 
a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
+++ 
b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
@@ -40,6 +40,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.logging.Logger;
 import java.util.zip.GZIPInputStream;
 
+import javax.xml.bind.JAXBContext;
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 import javax.xml.ws.AsyncHandler;
@@ -916,7 +917,11 @@ public class ClientServerTest extends 
AbstractBusClientServerTestBase {
 // that would actually notice the difference. At least it ensures that 
 // specifying the property does not explode.
 Map jaxbContextProperties = new HashMap();
-jaxbContextProperties.put("com.sun.xml.bind.defaultNamespaceRemap", 
"uri:ultima:thule");
+if 
(JAXBContext.newInstance(String.class).getClass().getName().contains("internal"))
 {
+
jaxbContextProperties.put("com.sun.xml.internal.bind.defaultNamespaceRemap", 
"uri:ultima:thule");
+} else {
+
jaxbContextProperties.put("com.sun.xml.bind.defaultNamespaceRemap", 
"uri:ultima:thule");
+}
 dcf.setJaxbContextProperties(jaxbContextProperties);
 client = dcf.createClient(wsdlUrl, serviceName, portName);
 updateAddressPort(client, PORT);



cxf git commit: Letting CXF StaxUtils prepare XMLStreamReader for Atom reads

2016-11-23 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes f794e015a -> 8e4970d93


Letting CXF StaxUtils prepare XMLStreamReader for Atom reads


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8e4970d9
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8e4970d9
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8e4970d9

Branch: refs/heads/3.0.x-fixes
Commit: 8e4970d931ae72f92c54d170a844b37137b8fda6
Parents: f794e01
Author: Sergey Beryozkin 
Authored: Wed Nov 23 14:27:36 2016 +
Committer: Sergey Beryozkin 
Committed: Wed Nov 23 14:31:23 2016 +

--
 .../provider/atom/AbstractAtomProvider.java |  6 ++--
 .../provider/atom/AtomPojoProviderTest.java | 37 
 2 files changed, 41 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/8e4970d9/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
--
diff --git 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
index 179ee66..acc1285 100644
--- 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
+++ 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
@@ -30,6 +30,7 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyReader;
 import javax.ws.rs.ext.MessageBodyWriter;
+import javax.xml.stream.XMLStreamReader;
 
 import org.apache.abdera.Abdera;
 import org.apache.abdera.model.Document;
@@ -39,6 +40,7 @@ import org.apache.abdera.parser.ParserOptions;
 import org.apache.abdera.writer.Writer;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.jaxrs.utils.ExceptionUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 
 public abstract class AbstractAtomProvider 
 implements MessageBodyWriter, MessageBodyReader {
@@ -89,10 +91,10 @@ public abstract class AbstractAtomProvider
 ParserOptions options = parser.getDefaultParserOptions();
 if (options != null) {
 options.setAutodetectCharset(autodetectCharset);
-options.setResolveEntities(false);
 }
 }
-Document doc = parser.parse(is);
+XMLStreamReader reader = StaxUtils.createXMLStreamReader(is);
+Document doc = parser.parse(reader);
 return doc.getRoot();
 }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e4970d9/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
--
diff --git 
a/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
 
b/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
index 934f763..18baa5b 100644
--- 
a/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
+++ 
b/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
@@ -145,6 +145,25 @@ public class AtomPojoProviderTest extends Assert {
 new Annotation[]{}, mt, null, bis);
 assertEquals("a", book.getName());
 }
+@Test
+public void testReadEntryNoBuilders2() throws Exception {
+final String entry = 
+"http://www.w3.org/2005/Atom\";>"
++ "a"
++ ""
++ ""
++ "a"
++ ""
++ ""
++ "";
+AtomPojoProvider provider = new AtomPojoProvider();
+ByteArrayInputStream bis = new ByteArrayInputStream(entry.getBytes());
+MediaType mt = MediaType.valueOf("application/atom+xml;type=entry");
+@SuppressWarnings({"unchecked", "rawtypes" })
+Book book = (Book)provider.readFrom((Class)Book.class, Book.class, 
+new Annotation[]{}, mt, null, bis);
+assertEquals("a", book.getName());
+}
 
 
 @Test
@@ -180,6 +199,24 @@ public class AtomPojoProviderTest extends Assert {
 }
  
 @Test
+public void testReadFeedWithoutBuilders2() throws Exception {
+AtomPojoProvider provider = new AtomPojoProvider();
+final String feed = 
+"http://www.w3.org/2005/Atom\";>"
++ "a"
++ "b"
++ "";
+MediaType mt = MediaType.valueOf("application/atom+xml;type=feed");
+ByteArrayInputStream bis = new Byte

cxf git commit: Letting CXF StaxUtils prepare XMLStreamReader for Atom reads

2016-11-23 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 0769de24e -> 9deb2d179


Letting CXF StaxUtils prepare XMLStreamReader for Atom reads


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/9deb2d17
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/9deb2d17
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/9deb2d17

Branch: refs/heads/3.1.x-fixes
Commit: 9deb2d179758d3da47ce3ea492c2606c0a6a8475
Parents: 0769de2
Author: Sergey Beryozkin 
Authored: Wed Nov 23 14:27:36 2016 +
Committer: Sergey Beryozkin 
Committed: Wed Nov 23 14:30:21 2016 +

--
 .../provider/atom/AbstractAtomProvider.java |  6 ++--
 .../provider/atom/AtomPojoProviderTest.java | 37 
 2 files changed, 41 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/9deb2d17/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
--
diff --git 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
index 179ee66..acc1285 100644
--- 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
+++ 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
@@ -30,6 +30,7 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyReader;
 import javax.ws.rs.ext.MessageBodyWriter;
+import javax.xml.stream.XMLStreamReader;
 
 import org.apache.abdera.Abdera;
 import org.apache.abdera.model.Document;
@@ -39,6 +40,7 @@ import org.apache.abdera.parser.ParserOptions;
 import org.apache.abdera.writer.Writer;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.jaxrs.utils.ExceptionUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 
 public abstract class AbstractAtomProvider 
 implements MessageBodyWriter, MessageBodyReader {
@@ -89,10 +91,10 @@ public abstract class AbstractAtomProvider
 ParserOptions options = parser.getDefaultParserOptions();
 if (options != null) {
 options.setAutodetectCharset(autodetectCharset);
-options.setResolveEntities(false);
 }
 }
-Document doc = parser.parse(is);
+XMLStreamReader reader = StaxUtils.createXMLStreamReader(is);
+Document doc = parser.parse(reader);
 return doc.getRoot();
 }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/9deb2d17/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
--
diff --git 
a/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
 
b/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
index 0296764..025748c 100644
--- 
a/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
+++ 
b/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
@@ -145,6 +145,25 @@ public class AtomPojoProviderTest extends Assert {
 new Annotation[]{}, mt, null, bis);
 assertEquals("a", book.getName());
 }
+@Test
+public void testReadEntryNoBuilders2() throws Exception {
+final String entry = 
+"http://www.w3.org/2005/Atom\";>"
++ "a"
++ ""
++ ""
++ "a"
++ ""
++ ""
++ "";
+AtomPojoProvider provider = new AtomPojoProvider();
+ByteArrayInputStream bis = new ByteArrayInputStream(entry.getBytes());
+MediaType mt = MediaType.valueOf("application/atom+xml;type=entry");
+@SuppressWarnings({"unchecked", "rawtypes" })
+Book book = (Book)provider.readFrom((Class)Book.class, Book.class, 
+new Annotation[]{}, mt, null, bis);
+assertEquals("a", book.getName());
+}
 
 
 @Test
@@ -180,6 +199,24 @@ public class AtomPojoProviderTest extends Assert {
 }
  
 @Test
+public void testReadFeedWithoutBuilders2() throws Exception {
+AtomPojoProvider provider = new AtomPojoProvider();
+final String feed = 
+"http://www.w3.org/2005/Atom\";>"
++ "a"
++ "b"
++ "";
+MediaType mt = MediaType.valueOf("application/atom+xml;type=feed");
+ByteArrayInputStream bis = new Byte

cxf git commit: Letting CXF StaxUtils prepare XMLStreamReader for Atom reads

2016-11-23 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/master 1cdab6490 -> d9e2a6e72


Letting CXF StaxUtils prepare XMLStreamReader for Atom reads


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d9e2a6e7
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d9e2a6e7
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d9e2a6e7

Branch: refs/heads/master
Commit: d9e2a6e7260ea12efa5355ffdfbf0b2415bccd14
Parents: 1cdab64
Author: Sergey Beryozkin 
Authored: Wed Nov 23 14:27:36 2016 +
Committer: Sergey Beryozkin 
Committed: Wed Nov 23 14:27:36 2016 +

--
 .../provider/atom/AbstractAtomProvider.java |  6 ++--
 .../provider/atom/AtomPojoProviderTest.java | 37 
 2 files changed, 41 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/d9e2a6e7/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
--
diff --git 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
index 179ee66..acc1285 100644
--- 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
+++ 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AbstractAtomProvider.java
@@ -30,6 +30,7 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyReader;
 import javax.ws.rs.ext.MessageBodyWriter;
+import javax.xml.stream.XMLStreamReader;
 
 import org.apache.abdera.Abdera;
 import org.apache.abdera.model.Document;
@@ -39,6 +40,7 @@ import org.apache.abdera.parser.ParserOptions;
 import org.apache.abdera.writer.Writer;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.jaxrs.utils.ExceptionUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 
 public abstract class AbstractAtomProvider 
 implements MessageBodyWriter, MessageBodyReader {
@@ -89,10 +91,10 @@ public abstract class AbstractAtomProvider
 ParserOptions options = parser.getDefaultParserOptions();
 if (options != null) {
 options.setAutodetectCharset(autodetectCharset);
-options.setResolveEntities(false);
 }
 }
-Document doc = parser.parse(is);
+XMLStreamReader reader = StaxUtils.createXMLStreamReader(is);
+Document doc = parser.parse(reader);
 return doc.getRoot();
 }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/d9e2a6e7/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
--
diff --git 
a/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
 
b/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
index 0296764..025748c 100644
--- 
a/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
+++ 
b/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProviderTest.java
@@ -145,6 +145,25 @@ public class AtomPojoProviderTest extends Assert {
 new Annotation[]{}, mt, null, bis);
 assertEquals("a", book.getName());
 }
+@Test
+public void testReadEntryNoBuilders2() throws Exception {
+final String entry = 
+"http://www.w3.org/2005/Atom\";>"
++ "a"
++ ""
++ ""
++ "a"
++ ""
++ ""
++ "";
+AtomPojoProvider provider = new AtomPojoProvider();
+ByteArrayInputStream bis = new ByteArrayInputStream(entry.getBytes());
+MediaType mt = MediaType.valueOf("application/atom+xml;type=entry");
+@SuppressWarnings({"unchecked", "rawtypes" })
+Book book = (Book)provider.readFrom((Class)Book.class, Book.class, 
+new Annotation[]{}, mt, null, bis);
+assertEquals("a", book.getName());
+}
 
 
 @Test
@@ -180,6 +199,24 @@ public class AtomPojoProviderTest extends Assert {
 }
  
 @Test
+public void testReadFeedWithoutBuilders2() throws Exception {
+AtomPojoProvider provider = new AtomPojoProvider();
+final String feed = 
+"http://www.w3.org/2005/Atom\";>"
++ "a"
++ "b"
++ "";
+MediaType mt = MediaType.valueOf("application/atom+xml;type=feed");
+ByteArrayInputStream bis = new ByteArrayInput

cxf-fediz git commit: Findbugs work on the Fediz services

2016-11-23 Thread coheigea
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 4944104ee -> 467382b88


Findbugs work on the Fediz services


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/467382b8
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/467382b8
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/467382b8

Branch: refs/heads/master
Commit: 467382b88b5652450f648a06a0f6575c7417ed1a
Parents: 4944104
Author: Colm O hEigeartaigh 
Authored: Wed Nov 23 13:31:31 2016 +
Committer: Colm O hEigeartaigh 
Committed: Wed Nov 23 13:31:31 2016 +

--
 .../cxf/fediz/service/idp/FedizEntryPoint.java  |  3 +-
 .../service/idp/STSAuthenticationProvider.java  |  2 +-
 .../idp/STSKrbAuthenticationProvider.java   |  5 ++
 .../cxf/fediz/service/idp/STSUserDetails.java   | 24 +
 .../service/idp/beans/CommonsURLValidator.java  | 52 
 .../idp/beans/PassiveRequestorValidator.java| 10 
 .../service/idp/beans/STSClientAction.java  |  2 +-
 .../kerberos/KerberosServiceRequestToken.java   | 17 +--
 .../idp/kerberos/PassThroughKerberosClient.java | 13 -
 .../ApplicationProtocolControllerImpl.java  |  2 +-
 .../fediz/service/idp/rest/IdpServiceImpl.java  | 25 ++
 .../WEB-INF/flows/federation-signin-request.xml |  3 +-
 .../flows/federation-validate-request.xml   |  8 ++-
 .../WEB-INF/flows/saml-signin-request.xml   |  3 +-
 .../oidc/clients/ClientRegistrationService.java |  4 +-
 .../fediz/service/sts/FileClaimsHandler.java|  2 +-
 .../sts/realms/RealmFileClaimsHandler.java  |  2 +-
 17 files changed, 142 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/467382b8/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FedizEntryPoint.java
--
diff --git 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FedizEntryPoint.java
 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FedizEntryPoint.java
index ea594d3..d266f3c 100644
--- 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FedizEntryPoint.java
+++ 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/FedizEntryPoint.java
@@ -95,7 +95,8 @@ public class FedizEntryPoint implements 
AuthenticationEntryPoint,
 if (loginUri == null) {
 LOG.warn("wauth value '" + wauth + "' not supported");
 response.sendError(
-HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "wauth value 
'" + wauth + "' not supported");
+HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "The wauth 
value that was supplied is not supported");
+return;
 }
 redirectUrl = new StringBuilder(extractFullContextPath(servletRequest))
 
.append(loginUri).append("?").append(servletRequest.getQueryString()).toString();

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/467382b8/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
--
diff --git 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
index dd30a4a..9938b7d 100644
--- 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
+++ 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSAuthenticationProvider.java
@@ -92,7 +92,7 @@ public abstract class STSAuthenticationProvider implements 
AuthenticationProvide
 
 List claims = parseClaimsInAssertion(assertion.getSaml2());
 for (Claim c : claims) {
-if (roleURI.equals(c.getClaimType())) {
+if (c.getClaimType() != null && 
roleURI.equals(c.getClaimType().toString())) {
 Object oValue = c.getValue();
 if ((oValue instanceof List) && 
!((List)oValue).isEmpty()) {
 List values = (List)oValue;

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/467382b8/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
--
diff --git 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
index 9a5dae8..62f4817 100644
--- 
a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
+++ 
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/STSKrbAuthenticationProvider.java
@@

[1/3] cxf git commit: Recording .gitmergeinfo Changes

2016-11-23 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 8ae768d76 -> f794e015a


Recording .gitmergeinfo Changes


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/24bbc950
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/24bbc950
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/24bbc950

Branch: refs/heads/3.0.x-fixes
Commit: 24bbc950551976426d5216406f4b2be6d12911eb
Parents: 8f1f537
Author: Colm O hEigeartaigh 
Authored: Wed Nov 23 12:28:33 2016 +
Committer: Colm O hEigeartaigh 
Committed: Wed Nov 23 12:28:33 2016 +

--
 .gitmergeinfo | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/24bbc950/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 5ca8811..5175379 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -1304,6 +1304,7 @@ M 0529afb26222feaf5e3954518a8e3bfacd857829
 M 05383ffcfc3fe16c6acadf1a343375c00fa1116c
 M 05b96b6e8d1c3f845ce4d9b8a77c638ed7e987b7
 M 070315cf06b2f2d8596c922115fd3f811e394ecc
+M 0769de24eff2ed0744c37edaa35acf0bb649baf2
 M 078d14e0926d345d4eb4bc80ba535a5d288483a3
 M 0a91c7b3694c8fb453a3eb9c50b94ba4870f8aff
 M 0c01db46c1834d0f7f837c7e71b30315042bfb08



[3/3] cxf git commit: Fixing merge

2016-11-23 Thread coheigea
Fixing merge


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/f794e015
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f794e015
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f794e015

Branch: refs/heads/3.0.x-fixes
Commit: f794e015ac2cc8b927b7b07d152dad04d5d20b13
Parents: 24bbc95
Author: Colm O hEigeartaigh 
Authored: Wed Nov 23 12:30:24 2016 +
Committer: Colm O hEigeartaigh 
Committed: Wed Nov 23 12:30:24 2016 +

--
 .../policyhandlers/SymmetricBindingHandler.java | 37 
 1 file changed, 6 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/f794e015/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
index 0237ab0..97e0b9c 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
@@ -928,8 +928,7 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 return id;
 }
 
-<<< HEAD
-private String getEncryptedKey() {
+private SecurityToken getEncryptedKey() {
 
 List results = 
CastUtils.cast((List)message.getExchange().getInMessage()
 .get(WSHandlerConstants.RECV_RESULTS));
@@ -946,32 +945,14 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 Date created = new Date();
 Date expires = new Date();
 expires.setTime(created.getTime() + 30);
-SecurityToken tempTok = new SecurityToken(encryptedKeyID, 
created, expires);
-
tempTok.setSecret((byte[])wser.get(WSSecurityEngineResult.TAG_SECRET));
-tempTok.setSHA1(getSHA1((byte[])wser
+SecurityToken securityToken = new 
SecurityToken(encryptedKeyID, created, expires);
+
securityToken.setSecret((byte[])wser.get(WSSecurityEngineResult.TAG_SECRET));
+securityToken.setSHA1(getSHA1((byte[])wser
 
.get(WSSecurityEngineResult.TAG_ENCRYPTED_EPHEMERAL_KEY)));
-tokenStore.add(tempTok);
 
-return encryptedKeyID;
+return securityToken;
 }
 }
-===
-private SecurityToken getEncryptedKey() {
-WSSecurityEngineResult encryptedKeyResult = getEncryptedKeyResult();
-if (encryptedKeyResult != null) {
-// Store it in the cache
-Date created = new Date();
-Date expires = new Date();
-expires.setTime(created.getTime() + 
WSS4JUtils.getSecurityTokenLifetime(message));
-
-String encryptedKeyID = 
(String)encryptedKeyResult.get(WSSecurityEngineResult.TAG_ID);
-SecurityToken securityToken = new SecurityToken(encryptedKeyID, 
created, expires);
-
securityToken.setSecret((byte[])encryptedKeyResult.get(WSSecurityEngineResult.TAG_SECRET));
-securityToken.setSHA1(getSHA1((byte[])encryptedKeyResult
-
.get(WSSecurityEngineResult.TAG_ENCRYPTED_EPHEMERAL_KEY)));
-
-return securityToken;
->>> 0769de2... CXF-7148 - Race Condition while handling symmetric key in 
SymmetricBindingHandler
 }
 return null;
 }
@@ -993,15 +974,9 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 }
 Date created = new Date();
 Date expires = new Date();
-<<< HEAD
 expires.setTime(created.getTime() + 30);
-SecurityToken tempTok = new SecurityToken(utID, created, 
expires);
-
-===
-expires.setTime(created.getTime() + 
WSS4JUtils.getSecurityTokenLifetime(message));
 SecurityToken securityToken = new SecurityToken(utID, 
created, expires);
-
->>> 0769de2... CXF-7148 - Race Condition while handling symmetric key in 
SymmetricBindingHandler
+
 byte[] secret = 
(byte[])wser.get(WSSecurityEngineResult.TAG_SECRET);
 securityToken.setSecret(secret);
 



[2/3] cxf git commit: CXF-7148 - Race Condition while handling symmetric key in SymmetricBindingHandler

2016-11-23 Thread coheigea
CXF-7148 - Race Condition while handling symmetric key in 
SymmetricBindingHandler

# Conflicts:
#   
rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8f1f537c
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8f1f537c
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8f1f537c

Branch: refs/heads/3.0.x-fixes
Commit: 8f1f537c7d764c5315935ba7ba8b4a6b44ec1b6b
Parents: 8ae768d
Author: Colm O hEigeartaigh 
Authored: Wed Nov 23 11:00:23 2016 +
Committer: Colm O hEigeartaigh 
Committed: Wed Nov 23 12:28:33 2016 +

--
 .../AsymmetricBindingHandler.java   |  3 +-
 .../policyhandlers/SymmetricBindingHandler.java | 39 
 2 files changed, 32 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/8f1f537c/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
index 6ea39c2..cb427df 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
@@ -847,8 +847,7 @@ public class AsymmetricBindingHandler extends 
AbstractBindingBuilder {
 tempTok.setTokenType(WSConstants.WSS_SAML_TOKEN_TYPE);
 }
 
-getTokenStore().add(tempTok);
-message.put(SecurityConstants.TOKEN_ID, tempTok.getId());
+message.put(SecurityConstants.TOKEN, tempTok);
 
 return id;
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8f1f537c/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
index 083f43e..0237ab0 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
@@ -155,13 +155,13 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 if (isRequestor()) {
 tokenId = setupEncryptedKey(encryptionWrapper, 
encryptionToken);
 } else {
-tokenId = getEncryptedKey();
+tok = getEncryptedKey();
 }
 } else if (encryptionToken instanceof UsernameToken) {
 if (isRequestor()) {
 tokenId = 
setupUTDerivedKey((UsernameToken)encryptionToken);
 } else {
-tokenId = getUTDerivedKey();
+tok = getUTDerivedKey();
 }
 }
 if (tok == null) {
@@ -285,13 +285,13 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 if (isRequestor()) {
 sigTokId = setupEncryptedKey(sigAbstractTokenWrapper, 
sigToken);
 } else {
-sigTokId = getEncryptedKey();
+sigTok = getEncryptedKey();
 }
 } else if (sigToken instanceof UsernameToken) {
 if (isRequestor()) {
 sigTokId = setupUTDerivedKey((UsernameToken)sigToken);
 } else {
-sigTokId = getUTDerivedKey();
+sigTok = getUTDerivedKey();
 }
 }
 } else {
@@ -928,6 +928,7 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 return id;
 }
 
+<<< HEAD
 private String getEncryptedKey() {
 
 List results = 
CastUtils.cast((List)message.getExchange().getInMessage()
@@ -954,11 +955,28 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 return encryptedKeyID;
 }
 }
+===
+pr

cxf git commit: CXF-7148 - Race Condition while handling symmetric key in SymmetricBindingHandler

2016-11-23 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 37b616d3e -> 0769de24e


CXF-7148 - Race Condition while handling symmetric key in 
SymmetricBindingHandler


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0769de24
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0769de24
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0769de24

Branch: refs/heads/3.1.x-fixes
Commit: 0769de24eff2ed0744c37edaa35acf0bb649baf2
Parents: 37b616d
Author: Colm O hEigeartaigh 
Authored: Wed Nov 23 11:00:23 2016 +
Committer: Colm O hEigeartaigh 
Committed: Wed Nov 23 11:00:49 2016 +

--
 .../AsymmetricBindingHandler.java   |  3 +--
 .../policyhandlers/SymmetricBindingHandler.java | 28 +---
 2 files changed, 14 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/0769de24/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
index 2643422..93d849c 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
@@ -827,8 +827,7 @@ public class AsymmetricBindingHandler extends 
AbstractBindingBuilder {
 tempTok.setTokenType(WSConstants.WSS_SAML_TOKEN_TYPE);
 }
 
-getTokenStore().add(tempTok);
-message.put(SecurityConstants.TOKEN_ID, tempTok.getId());
+message.put(SecurityConstants.TOKEN, tempTok);
 
 return id;
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/0769de24/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
index 0728b1d..dca4456 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
@@ -160,13 +160,13 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 if (isRequestor()) {
 tokenId = setupEncryptedKey(encryptionWrapper, 
encryptionToken);
 } else {
-tokenId = getEncryptedKey();
+tok = getEncryptedKey();
 }
 } else if (encryptionToken instanceof UsernameToken) {
 if (isRequestor()) {
 tokenId = 
setupUTDerivedKey((UsernameToken)encryptionToken);
 } else {
-tokenId = getUTDerivedKey();
+tok = getUTDerivedKey();
 }
 }
 if (tok == null) {
@@ -290,13 +290,13 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 if (isRequestor()) {
 sigTokId = setupEncryptedKey(sigAbstractTokenWrapper, 
sigToken);
 } else {
-sigTokId = getEncryptedKey();
+sigTok = getEncryptedKey();
 }
 } else if (sigToken instanceof UsernameToken) {
 if (isRequestor()) {
 sigTokId = setupUTDerivedKey((UsernameToken)sigToken);
 } else {
-sigTokId = getUTDerivedKey();
+sigTok = getUTDerivedKey();
 }
 }
 } else {
@@ -970,7 +970,7 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 return id;
 }
 
-private String getEncryptedKey() {
+private SecurityToken getEncryptedKey() {
 WSSecurityEngineResult encryptedKeyResult = getEncryptedKeyResult();
 if (encryptedKeyResult != null) {
 // Store it in the cache
@@ -979,19 +979,18 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 expires.setTime(created.ge

cxf git commit: CXF-7148 - Race Condition while handling symmetric key in SymmetricBindingHandler

2016-11-23 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master 267622c64 -> 1cdab6490


CXF-7148 - Race Condition while handling symmetric key in 
SymmetricBindingHandler


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1cdab649
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1cdab649
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1cdab649

Branch: refs/heads/master
Commit: 1cdab6490f3a83599326c3bae51ae76af3b5b8fe
Parents: 267622c
Author: Colm O hEigeartaigh 
Authored: Wed Nov 23 11:00:23 2016 +
Committer: Colm O hEigeartaigh 
Committed: Wed Nov 23 11:00:23 2016 +

--
 .../AsymmetricBindingHandler.java   |  3 +--
 .../policyhandlers/SymmetricBindingHandler.java | 28 +---
 2 files changed, 14 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/1cdab649/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
index cafa16b..28c33d8 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
@@ -826,8 +826,7 @@ public class AsymmetricBindingHandler extends 
AbstractBindingBuilder {
 tempTok.setTokenType(WSConstants.WSS_SAML_TOKEN_TYPE);
 }
 
-getTokenStore().add(tempTok);
-message.put(SecurityConstants.TOKEN_ID, tempTok.getId());
+message.put(SecurityConstants.TOKEN, tempTok);
 
 return id;
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/1cdab649/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
index 8bb6af2..2534048 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
@@ -160,13 +160,13 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 if (isRequestor()) {
 tokenId = setupEncryptedKey(encryptionWrapper, 
encryptionToken);
 } else {
-tokenId = getEncryptedKey();
+tok = getEncryptedKey();
 }
 } else if (encryptionToken instanceof UsernameToken) {
 if (isRequestor()) {
 tokenId = 
setupUTDerivedKey((UsernameToken)encryptionToken);
 } else {
-tokenId = getUTDerivedKey();
+tok = getUTDerivedKey();
 }
 }
 if (tok == null) {
@@ -290,13 +290,13 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 if (isRequestor()) {
 sigTokId = setupEncryptedKey(sigAbstractTokenWrapper, 
sigToken);
 } else {
-sigTokId = getEncryptedKey();
+sigTok = getEncryptedKey();
 }
 } else if (sigToken instanceof UsernameToken) {
 if (isRequestor()) {
 sigTokId = setupUTDerivedKey((UsernameToken)sigToken);
 } else {
-sigTokId = getUTDerivedKey();
+sigTok = getUTDerivedKey();
 }
 }
 } else {
@@ -970,7 +970,7 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 return id;
 }
 
-private String getEncryptedKey() {
+private SecurityToken getEncryptedKey() {
 WSSecurityEngineResult encryptedKeyResult = getEncryptedKeyResult();
 if (encryptedKeyResult != null) {
 // Store it in the cache
@@ -979,19 +979,18 @@ public class SymmetricBindingHandler extends 
AbstractBindingBuilder {
 expires.setTime(created.getTime() +