cxf git commit: Completing the NPE checking code in the basic json writer

2016-12-02 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 1c9d9e4b1 -> 2f3ba6e5c


Completing the NPE checking code in the basic json writer


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

Branch: refs/heads/3.1.x-fixes
Commit: 2f3ba6e5c524e764cef966c185b437380a1d624d
Parents: 1c9d9e4
Author: Sergey Beryozkin 
Authored: Fri Dec 2 16:50:13 2016 +
Committer: Sergey Beryozkin 
Committed: Fri Dec 2 16:51:20 2016 +

--
 .../apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java| 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/2f3ba6e5/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
--
diff --git 
a/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
 
b/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
index d1fb1f5..abf6eef 100644
--- 
a/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
+++ 
b/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
@@ -305,6 +305,9 @@ public class JsonMapObjectReaderWriter {
 @Override
 public Output append(String str) {
 try {
+if (str == null) {
+str = "null";
+}
 os.write(StringUtils.toBytesUTF8(str));
 } catch (IOException ex) {
 throw new RuntimeException(ex);



[2/2] cxf git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf

2016-12-02 Thread sergeyb
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf


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

Branch: refs/heads/master
Commit: 08911629ee02b12b1d7b14ef4d1c6de6d292e947
Parents: d99c9ad 7a98960
Author: Sergey Beryozkin 
Authored: Fri Dec 2 16:50:39 2016 +
Committer: Sergey Beryozkin 
Committed: Fri Dec 2 16:50:39 2016 +

--
 .../apache/cxf/maven_plugin/Java2WSMojo.java| 22 +++-
 1 file changed, 17 insertions(+), 5 deletions(-)
--




[1/2] cxf git commit: Completing the NPE checking code in the basic json writer

2016-12-02 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/master 7a9896006 -> 08911629e


Completing the NPE checking code in the basic json writer


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

Branch: refs/heads/master
Commit: d99c9ad353894b95b6ae866a7e63b9dbb8a0665c
Parents: 4dcf512
Author: Sergey Beryozkin 
Authored: Fri Dec 2 16:50:13 2016 +
Committer: Sergey Beryozkin 
Committed: Fri Dec 2 16:50:13 2016 +

--
 .../apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java| 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/d99c9ad3/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
--
diff --git 
a/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
 
b/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
index d1fb1f5..abf6eef 100644
--- 
a/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
+++ 
b/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java
@@ -305,6 +305,9 @@ public class JsonMapObjectReaderWriter {
 @Override
 public Output append(String str) {
 try {
+if (str == null) {
+str = "null";
+}
 os.write(StringUtils.toBytesUTF8(str));
 } catch (IOException ex) {
 throw new RuntimeException(ex);



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

2016-12-02 Thread dkulp
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 6187ae4e1 -> 1c9d9e4b1


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/1c9d9e4b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1c9d9e4b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1c9d9e4b

Branch: refs/heads/3.1.x-fixes
Commit: 1c9d9e4b190c6ea10285e8c45298d41141635a6b
Parents: 6fe5b5a
Author: Daniel Kulp 
Authored: Fri Dec 2 11:46:39 2016 -0500
Committer: Daniel Kulp 
Committed: Fri Dec 2 11:49:21 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/1c9d9e4b/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 59cc9bb..e15017a 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -61,6 +61,7 @@ B 584df3ae111595da1b44ccd9db9567c2172bbb2e
 B 59b8615053ddcad353fbebcd9a5b1109ae0897a1
 B 5a57f4a89737a5cfa37ffb94f6643c08e2ab6eb1
 B 5d73e20b4539bfa4c8ca607b27a1c1ea1850e095
+B 62060f8bc1f4d85b77ff136cb0576049312b8541
 B 629af817f4762a12623e76fb7f7baefe98482719
 B 65e1e07fdb810ec9de135530ca3e3d23821836a3
 B 66447a377f0b2cafc2f337456b5fd41f832556e0
@@ -188,6 +189,7 @@ M 4b0868a8ee6f53d8543860a458821c35ec2a79a2
 M 4f4ce80ba2de80219e13943cbd6edbf47234
 M 574b2a9997c94011794fa2e083181e23c9936f15
 M 585df048b7730ee36644a4bb7c1a20fcf977d79e
+M 5954d4ce3c9713c17c3bbb8b730fad210aebfb3a
 M 5b7b014cc1d24cba1191bc07fd48b13dbf4d4391
 M 5cff82c735c7543ce6dfb6c52ac72f583dbb5d22
 M 6242c682dfce4a2ba4869978c28b14f1472484c1
@@ -200,6 +202,7 @@ M 7690a1fd087aff24ad8e8e1ab2e0722e24bf3d81
 M 804a957eb4225a1eaf65399881cdcd8552c00f52
 M 80ca2370616c28b036c54c95af84ca62f1725a30
 M 8118c5a301f22dea16c9d235ad378584a0ae2466
+M 847216a39ba3639f3170b8ad939548788fff4eb6
 M 8583a24ac541dc373503d7a6c59cd90890acdae3
 M 86667619dc61c8a84672fc5a583b4517f48176c5
 M 896f1abec915897967905762d6e850cfb6bac3bc



[2/2] cxf git commit: [CXF-7156] added portName configuration option to the Java2WSMojo to no longer have to use argline for the portname option This closes #208

2016-12-02 Thread dkulp
[CXF-7156] added portName configuration option to the Java2WSMojo to no longer 
have to use argline for the portname option
This closes #208


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

Branch: refs/heads/3.1.x-fixes
Commit: 6fe5b5a80d477ba460c223e62f4b73b825cd3771
Parents: 6187ae4
Author: Stefaan Dutry 
Authored: Sun Nov 27 13:47:19 2016 +0100
Committer: Daniel Kulp 
Committed: Fri Dec 2 11:49:21 2016 -0500

--
 .../apache/cxf/maven_plugin/Java2WSMojo.java| 22 +++-
 1 file changed, 17 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/6fe5b5a8/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
--
diff --git 
a/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
 
b/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
index f819aa4..b97c7d3 100644
--- 
a/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
+++ 
b/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
@@ -151,6 +151,12 @@ public class Java2WSMojo extends AbstractMojo {
 private Boolean genWrapperbean;
 
 /**
+ * @parameter
+ */
+private String portName;
+
+
+/**
  * Attach the generated wsdl file to the list of files to be deployed
  * on install. This means the wsdl file will be copied to the repository
  * with groupId, artifactId and version of the project and type "wsdl".
@@ -283,12 +289,12 @@ public class Java2WSMojo extends AbstractMojo {
 }
 }
 
-if (frontend != null) {
+if (!StringUtils.isEmpty(frontend)) {
 args.add("-frontend");
 args.add(frontend);
 }
 
-if (databinding != null) {
+if (!StringUtils.isEmpty(databinding)) {
 args.add("-databinding");
 args.add(databinding);
 }
@@ -315,13 +321,13 @@ public class Java2WSMojo extends AbstractMojo {
 }
 
 // target namespace arg
-if (targetNamespace != null) {
+if (!StringUtils.isEmpty(targetNamespace)) {
 args.add("-t");
 args.add(targetNamespace);
 }
 
 // servicename arg
-if (serviceName != null) {
+if (!StringUtils.isEmpty(serviceName)) {
 args.add("-servicename");
 args.add(serviceName);
 }
@@ -337,11 +343,17 @@ public class Java2WSMojo extends AbstractMojo {
 }
 
 // address arg
-if (address != null) {
+if (!StringUtils.isEmpty(address)) {
 args.add("-address");
 args.add(address);
 }
 
+// portname arg
+if (!StringUtils.isEmpty(portName)) {
+args.add("-portname");
+args.add(portName);
+}
+
 if (argline != null) {
 StringTokenizer stoken = new StringTokenizer(argline, " ");
 while (stoken.hasMoreTokens()) {



cxf git commit: [CXF-7161] Avoiding reporting a null secret key with a dangling secret expiry time, patch from Adrian Gonzalez applied, This closes #209

2016-12-02 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 49da1446b -> 6187ae4e1


[CXF-7161] Avoiding reporting a null secret key with a dangling secret expiry 
time, patch from Adrian Gonzalez applied, This closes #209


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

Branch: refs/heads/3.1.x-fixes
Commit: 6187ae4e155acad436ae2ef53e5cc606c64c703f
Parents: 49da144
Author: Sergey Beryozkin 
Authored: Fri Dec 2 16:42:09 2016 +
Committer: Sergey Beryozkin 
Committed: Fri Dec 2 16:43:43 2016 +

--
 .../security/oauth2/services/DynamicRegistrationService.java | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/6187ae4e/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
index 8a8dd93..69d7f7b 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
@@ -125,10 +125,12 @@ public class DynamicRegistrationService {
 protected ClientRegistrationResponse 
fromClientToRegistrationResponse(Client client) {
 ClientRegistrationResponse response = new ClientRegistrationResponse();
 response.setClientId(client.getClientId());
-response.setClientSecret(client.getClientSecret());
+if (client.getClientSecret() != null) {
+response.setClientSecret(client.getClientSecret());
+// TODO: consider making Client secret time limited
+response.setClientSecretExpiresAt(Long.valueOf(0));
+}
 response.setClientIdIssuedAt(client.getRegisteredAt());
-// TODO: consider making Client secret time limited
-response.setClientSecretExpiresAt(Long.valueOf(0));
 UriBuilder ub = 
getMessageContext().getUriInfo().getAbsolutePathBuilder();
 
 if (supportRegistrationAccessTokens) {



cxf git commit: [CXF-7156] added portName configuration option to the Java2WSMojo to no longer have to use argline for the portname option This closes #208

2016-12-02 Thread dkulp
Repository: cxf
Updated Branches:
  refs/heads/master 4dcf51205 -> 7a9896006


[CXF-7156] added portName configuration option to the Java2WSMojo to no longer 
have to use argline for the portname option
This closes #208


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

Branch: refs/heads/master
Commit: 7a989600653fbbe42d621fa7d7abbc07fec2e009
Parents: 4dcf512
Author: Stefaan Dutry 
Authored: Sun Nov 27 13:47:19 2016 +0100
Committer: Daniel Kulp 
Committed: Fri Dec 2 11:42:54 2016 -0500

--
 .../apache/cxf/maven_plugin/Java2WSMojo.java| 22 +++-
 1 file changed, 17 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/7a989600/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
--
diff --git 
a/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
 
b/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
index f819aa4..b97c7d3 100644
--- 
a/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
+++ 
b/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
@@ -151,6 +151,12 @@ public class Java2WSMojo extends AbstractMojo {
 private Boolean genWrapperbean;
 
 /**
+ * @parameter
+ */
+private String portName;
+
+
+/**
  * Attach the generated wsdl file to the list of files to be deployed
  * on install. This means the wsdl file will be copied to the repository
  * with groupId, artifactId and version of the project and type "wsdl".
@@ -283,12 +289,12 @@ public class Java2WSMojo extends AbstractMojo {
 }
 }
 
-if (frontend != null) {
+if (!StringUtils.isEmpty(frontend)) {
 args.add("-frontend");
 args.add(frontend);
 }
 
-if (databinding != null) {
+if (!StringUtils.isEmpty(databinding)) {
 args.add("-databinding");
 args.add(databinding);
 }
@@ -315,13 +321,13 @@ public class Java2WSMojo extends AbstractMojo {
 }
 
 // target namespace arg
-if (targetNamespace != null) {
+if (!StringUtils.isEmpty(targetNamespace)) {
 args.add("-t");
 args.add(targetNamespace);
 }
 
 // servicename arg
-if (serviceName != null) {
+if (!StringUtils.isEmpty(serviceName)) {
 args.add("-servicename");
 args.add(serviceName);
 }
@@ -337,11 +343,17 @@ public class Java2WSMojo extends AbstractMojo {
 }
 
 // address arg
-if (address != null) {
+if (!StringUtils.isEmpty(address)) {
 args.add("-address");
 args.add(address);
 }
 
+// portname arg
+if (!StringUtils.isEmpty(portName)) {
+args.add("-portname");
+args.add(portName);
+}
+
 if (argline != null) {
 StringTokenizer stoken = new StringTokenizer(argline, " ");
 while (stoken.hasMoreTokens()) {



cxf git commit: [CXF-7161] Avoiding reporting a null secret key with a dangling secret expiry time, patch from Adrian Gonzalez applied, This closes #209

2016-12-02 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/master 66e97c77e -> 4dcf51205


[CXF-7161] Avoiding reporting a null secret key with a dangling secret expiry 
time, patch from Adrian Gonzalez applied, This closes #209


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

Branch: refs/heads/master
Commit: 4dcf5120561ba5b11bf9493c931889c591cf36e0
Parents: 66e97c7
Author: Sergey Beryozkin 
Authored: Fri Dec 2 16:42:09 2016 +
Committer: Sergey Beryozkin 
Committed: Fri Dec 2 16:42:09 2016 +

--
 .../security/oauth2/services/DynamicRegistrationService.java | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/4dcf5120/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
index 8a8dd93..69d7f7b 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
@@ -125,10 +125,12 @@ public class DynamicRegistrationService {
 protected ClientRegistrationResponse 
fromClientToRegistrationResponse(Client client) {
 ClientRegistrationResponse response = new ClientRegistrationResponse();
 response.setClientId(client.getClientId());
-response.setClientSecret(client.getClientSecret());
+if (client.getClientSecret() != null) {
+response.setClientSecret(client.getClientSecret());
+// TODO: consider making Client secret time limited
+response.setClientSecretExpiresAt(Long.valueOf(0));
+}
 response.setClientIdIssuedAt(client.getRegisteredAt());
-// TODO: consider making Client secret time limited
-response.setClientSecretExpiresAt(Long.valueOf(0));
 UriBuilder ub = 
getMessageContext().getUriInfo().getAbsolutePathBuilder();
 
 if (supportRegistrationAccessTokens) {



[2/3] cxf git commit: Fixing security merge

2016-12-02 Thread coheigea
Fixing security merge


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

Branch: refs/heads/3.0.x-fixes
Commit: 3f2c0530d9050793c29ae6b40254f582db10dbae
Parents: aef4429
Author: Colm O hEigeartaigh 
Authored: Fri Dec 2 14:11:03 2016 +
Committer: Colm O hEigeartaigh 
Committed: Fri Dec 2 14:56:03 2016 +

--
 .../security/wss4j/policyhandlers/AbstractBindingBuilder.java | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/3f2c0530/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index 49ca4bd..47df4c8 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -607,11 +607,7 @@ public abstract class AbstractBindingBuilder extends 
AbstractCommonBindingHandle
 }
 
 protected Element cloneElement(Element el) {
-<<< HEAD
-if 
(!secHeader.getSecurityHeader().getOwnerDocument().equals(el.getOwnerDocument()))
 {
-return 
(Element)secHeader.getSecurityHeader().getOwnerDocument().importNode(el, true);
-===
-Document doc = secHeader.getSecurityHeaderElement().getOwnerDocument();
+Document doc = secHeader.getSecurityHeader().getOwnerDocument();
 if (!doc.equals(el.getOwnerDocument())) {
 
 XMLStreamReader reader = StaxUtils.createXMLStreamReader(el);
@@ -623,7 +619,6 @@ public abstract class AbstractBindingBuilder extends 
AbstractCommonBindingHandle
 } catch (XMLStreamException ex) {
 LOG.log(Level.FINE, "Error cloning security element", ex);
 }
->>> 66e97c7... CXF-6604 - Sporadic ClassCastException in 
AsymmetricBindingHandler#doSignBeforeEncrypt
 }
 return el;
 }



[1/3] cxf git commit: CXF-6604 - Sporadic ClassCastException in AsymmetricBindingHandler#doSignBeforeEncrypt

2016-12-02 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes bbc08254a -> 26816e94a


CXF-6604 - Sporadic ClassCastException in 
AsymmetricBindingHandler#doSignBeforeEncrypt

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


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

Branch: refs/heads/3.0.x-fixes
Commit: aef4429f41231c9315e7090029385f9b2511067e
Parents: bbc0825
Author: Colm O hEigeartaigh 
Authored: Fri Dec 2 13:30:06 2016 +
Committer: Colm O hEigeartaigh 
Committed: Fri Dec 2 14:56:01 2016 +

--
 .../org/apache/cxf/staxutils/StaxUtils.java |  2 +-
 .../policyhandlers/AbstractBindingBuilder.java  | 20 
 2 files changed, 21 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/aef4429f/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
--
diff --git a/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java 
b/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
index 2f52784..2d376f0 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
@@ -94,7 +94,7 @@ import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.message.Message;
 
 public final class StaxUtils {
-// System properies for defaults, but also contextual properties usable
+// System properties for defaults, but also contextual properties usable
 // for StaxInInterceptor
 public static final String MAX_CHILD_ELEMENTS = 
 "org.apache.cxf.stax.maxChildElements";

http://git-wip-us.apache.org/repos/asf/cxf/blob/aef4429f/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index d75f3d4..49ca4bd 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -40,6 +40,8 @@ import javax.xml.namespace.QName;
 import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPHeader;
 import javax.xml.soap.SOAPMessage;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
 import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathConstants;
 import javax.xml.xpath.XPathExpressionException;
@@ -47,6 +49,7 @@ import javax.xml.xpath.XPathFactory;
 
 import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
@@ -65,6 +68,8 @@ import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.resource.ResourceManager;
 import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.staxutils.StaxUtils;
+import org.apache.cxf.staxutils.W3CDOMStreamWriter;
 import org.apache.cxf.ws.policy.AssertionInfo;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
 import org.apache.cxf.ws.policy.PolicyConstants;
@@ -602,8 +607,23 @@ public abstract class AbstractBindingBuilder extends 
AbstractCommonBindingHandle
 }
 
 protected Element cloneElement(Element el) {
+<<< HEAD
 if 
(!secHeader.getSecurityHeader().getOwnerDocument().equals(el.getOwnerDocument()))
 {
 return 
(Element)secHeader.getSecurityHeader().getOwnerDocument().importNode(el, true);
+===
+Document doc = secHeader.getSecurityHeaderElement().getOwnerDocument();
+if (!doc.equals(el.getOwnerDocument())) {
+
+XMLStreamReader reader = StaxUtils.createXMLStreamReader(el);
+DocumentFragment fragment = doc.createDocumentFragment();
+W3CDOMStreamWriter writer = new W3CDOMStreamWriter(fragment);
+try {
+StaxUtils.copy(reader, writer);
+return (Element)fragment.getFirstChild();
+} catch (XMLStreamException ex) {
+LOG.log(Level.FINE, "Error cloning security element", ex);
+}
+>>> 66e97c7... CXF-6604 - Sporadic ClassCastException in 
AsymmetricBindingHandler#doSignBeforeEncrypt
 }
 return el;
 }

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

2016-12-02 Thread coheigea
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/26816e94
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/26816e94
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/26816e94

Branch: refs/heads/3.0.x-fixes
Commit: 26816e94aaac6214659e2e7434ce930e16544b93
Parents: 3f2c053
Author: Colm O hEigeartaigh 
Authored: Fri Dec 2 14:56:03 2016 +
Committer: Colm O hEigeartaigh 
Committed: Fri Dec 2 14:56:03 2016 +

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/26816e94/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index c752032..ef169ca 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -242,11 +242,13 @@ B 304ee04631e07040519f32ece1e44a79e784dff8
 B 3051c2a54adc909be8d63c690b1444eb2f9e5e35
 B 30853113b4c4d47200bcf5305e5e88735f32cc8f
 B 30ad57d5590257960030161c2bd20ab4131d9c7b
+B 30c2ad01145045b01c68dff3a1e9bb5a79324407
 B 310b23956dee38cd4e80862f37010acc2b6adfd8
 B 3134609dcd0443d4007a7829df57c148fff947b3
 B 315e357e850407e9f3233259bab33ea765633271
 B 3198d8b2bba180fe40fb6729695b0d0226dd02a8
 B 31ae9a426ecf380aa4a685aebf50f18a62053bb2
+B 31bdc0159c5a9abf4beb0e20dcc7a9a2e05b7124
 B 321b2f8b66bf6b9d1fa68aba086c8cddf18070e3
 B 322cfa1a329b56d7db5c7cbdf5c5f3cd46a23b92
 B 3240a6a27e48f41e15ab75ed2c1735a1f5056668
@@ -681,6 +683,7 @@ B 868304818c7b687d33cdf0ae1a620d06f2b9028f
 B 869be21c4dfb4384be520b1d2ddf51aafa3e510d
 B 869e4af2acc7acfea2667ae7c47432fcb0e56976
 B 86a0eca9db696ac997d48b80222c15d43743bf97
+B 86a2293dd6cfb7c6b71468f23ae1faf2a66b6ba4
 B 87091eefd18770ea7de6c6257a150fb0a217c160
 B 8709d976fc796abe7ed6785524e5453b5fc530fb
 B 871df8c66dbab4adc1c50f966df21996f5bde6e2
@@ -1216,6 +1219,7 @@ B ed525fe47bfbb45bc8894e6b993db2ab0376ef5d
 B edb2304a4e9213051c052017a397b829048a7485
 B ede8089e0548bd4dd675414840b644dd99316323
 B ee64acf5f8370cd1e33719e4d9d4e9922e386602
+B eeab95c08beeb7b74d9c586ccabd1e6e16c2f5ca
 B eee2a947d867c403c212677cf942b3d07fa06fd7
 B efac3c9e56559370e2d8c8733f7886f83662b4e4
 B effcaf3f6cfb4b3287d683285592f2693af42b29
@@ -1349,6 +1353,7 @@ M 1c238edf60aaa0f14346f779a296794304bb808d
 M 1d07267bc4464e50dc9b5e81606958e3252873cd
 M 1dec7e3bd3956d5a0fba3c79a9a897e87941e9b6
 M 1e6f12f65bc490a5ba5f274b6e407abbf0a19d43
+M 209908a48735837737a34f8be92aded92e97a26f
 M 20bb7bafbc74def6a609fa83fa9b2fb2dd4ba9ea
 M 218321c866c2bb96309f901ee999b21e37d89845
 M 21bbc3862a0d45ff27ee991b77ea78571c0c3789



[3/6] cxf git commit: Fixing merge

2016-12-02 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/86a2293d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/86a2293d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/86a2293d

Branch: refs/heads/3.1.x-fixes
Commit: 86a2293dd6cfb7c6b71468f23ae1faf2a66b6ba4
Parents: 30c2ad0
Author: Colm O hEigeartaigh 
Authored: Fri Dec 2 14:10:18 2016 +
Committer: Colm O hEigeartaigh 
Committed: Fri Dec 2 14:10:18 2016 +

--
 .../http_undertow/UndertowHTTPServerEngine.java | 541 ---
 .../atmosphere/DefaultProtocolInterceptor.java  |   6 +-
 2 files changed, 1 insertion(+), 546 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/86a2293d/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
--
diff --git 
a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
 
b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
deleted file mode 100644
index ad3a6a6..000
--- 
a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
+++ /dev/null
@@ -1,541 +0,0 @@
-/**
- * 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 Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.transport.http_undertow;
-
-
-import java.io.IOException;
-import java.net.URL;
-import java.security.GeneralSecurityException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.concurrent.ConcurrentMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.X509KeyManager;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.common.i18n.Message;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.common.util.PropertyUtils;
-import org.apache.cxf.common.util.SystemPropertyAction;
-import org.apache.cxf.configuration.jsse.TLSServerParameters;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.transport.HttpUriMapper;
-import org.apache.cxf.transport.https.AliasedX509ExtendedKeyManager;
-import org.xnio.Options;
-import org.xnio.Sequence;
-import org.xnio.SslClientAuthMode;
-
-import io.undertow.Handlers;
-import io.undertow.Undertow;
-import io.undertow.Undertow.Builder;
-import io.undertow.UndertowOptions;
-import io.undertow.server.HttpHandler;
-import io.undertow.server.handlers.PathHandler;
-import io.undertow.servlet.api.DeploymentInfo;
-import io.undertow.servlet.api.DeploymentManager;
-import io.undertow.servlet.api.ServletContainer;
-import io.undertow.servlet.api.ServletInfo;
-import io.undertow.servlet.core.ServletContainerImpl;
-import io.undertow.servlet.handlers.ServletPathMatches;
-import io.undertow.util.CopyOnWriteMap;
-
-
-public class UndertowHTTPServerEngine implements ServerEngine {
-
-public static final String DO_NOT_CHECK_URL_PROP = 
"org.apache.cxf.transports.http_undertow.DontCheckUrl";
-
-private static final Logger LOG = 
LogUtils.getL7dLogger(UndertowHTTPServerEngine.class);
-
-/**
- * This is the network port for which this engine is allocated.
- */
-private int port;
-
-/**
- * This is the network address for which this engine is allocated.
- */
-private String host;
-
-/**
- * This field holds the protocol for which this engine is 
- * enabled, i.e. "http" or "https".
- */
-private String protocol = "http"; 
-
-private int servantCount;
-
-private Undertow server;
-
-/**
- * This field holds the TLS ServerParameters that are programatically
- * configured. The tlsServerParamers (due to JAXB) holds the struct
- * placed by 

[6/6] cxf git commit: Fixing security merge

2016-12-02 Thread coheigea
Fixing security merge


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

Branch: refs/heads/3.1.x-fixes
Commit: 49da1446b20bbea0fa35ee684fe21382cf2b2333
Parents: 31bdc01
Author: Colm O hEigeartaigh 
Authored: Fri Dec 2 14:11:03 2016 +
Committer: Colm O hEigeartaigh 
Committed: Fri Dec 2 14:11:03 2016 +

--
 .../security/wss4j/policyhandlers/AbstractBindingBuilder.java | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/49da1446/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index d15c3b6..f187e9c 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -613,11 +613,7 @@ public abstract class AbstractBindingBuilder extends 
AbstractCommonBindingHandle
 }
 
 protected Element cloneElement(Element el) {
-<<< HEAD
-if 
(!secHeader.getSecurityHeader().getOwnerDocument().equals(el.getOwnerDocument()))
 {
-return 
(Element)secHeader.getSecurityHeader().getOwnerDocument().importNode(el, true);
-===
-Document doc = secHeader.getSecurityHeaderElement().getOwnerDocument();
+Document doc = secHeader.getSecurityHeader().getOwnerDocument();
 if (!doc.equals(el.getOwnerDocument())) {
 
 XMLStreamReader reader = StaxUtils.createXMLStreamReader(el);
@@ -629,7 +625,6 @@ public abstract class AbstractBindingBuilder extends 
AbstractCommonBindingHandle
 } catch (XMLStreamException ex) {
 LOG.log(Level.FINE, "Error cloning security element", ex);
 }
->>> 66e97c7... CXF-6604 - Sporadic ClassCastException in 
AsymmetricBindingHandler#doSignBeforeEncrypt
 }
 return el;
 }



[1/6] cxf git commit: Findbugs work on the transports

2016-12-02 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes bdc67fbc2 -> 49da1446b


Findbugs work on the transports

# Conflicts:
#   
rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
#   
rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java


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

Branch: refs/heads/3.1.x-fixes
Commit: eeab95c08beeb7b74d9c586ccabd1e6e16c2f5ca
Parents: bdc67fb
Author: Colm O hEigeartaigh 
Authored: Fri Dec 2 11:12:23 2016 +
Committer: Colm O hEigeartaigh 
Committed: Fri Dec 2 14:09:59 2016 +

--
 .../http_undertow/UndertowHTTPServerEngine.java | 541 +++
 .../org/apache/cxf/transport/http/Headers.java  |   2 +-
 .../apache/cxf/transport/http/ProxyFactory.java |   2 +-
 .../http/auth/AbstractSpnegoAuthSupplier.java   |   2 +-
 .../cxf/transport/http/auth/HttpAuthHeader.java |   7 +-
 .../osgi/ConfigAdminHttpConduitConfigurer.java  |   2 +-
 .../apache/cxf/transport/jms/JMSConduit.java|   2 +-
 .../cxf/transport/jms/uri/JMSEndpoint.java  |  13 +-
 .../atmosphere/DefaultProtocolInterceptor.java  |   4 +
 9 files changed, 561 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/eeab95c0/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
--
diff --git 
a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
 
b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
new file mode 100644
index 000..ad3a6a6
--- /dev/null
+++ 
b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
@@ -0,0 +1,541 @@
+/**
+ * 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 Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.transport.http_undertow;
+
+
+import java.io.IOException;
+import java.net.URL;
+import java.security.GeneralSecurityException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.ConcurrentMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.net.ssl.KeyManager;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.X509KeyManager;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.PropertyUtils;
+import org.apache.cxf.common.util.SystemPropertyAction;
+import org.apache.cxf.configuration.jsse.TLSServerParameters;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.transport.HttpUriMapper;
+import org.apache.cxf.transport.https.AliasedX509ExtendedKeyManager;
+import org.xnio.Options;
+import org.xnio.Sequence;
+import org.xnio.SslClientAuthMode;
+
+import io.undertow.Handlers;
+import io.undertow.Undertow;
+import io.undertow.Undertow.Builder;
+import io.undertow.UndertowOptions;
+import io.undertow.server.HttpHandler;
+import io.undertow.server.handlers.PathHandler;
+import io.undertow.servlet.api.DeploymentInfo;
+import io.undertow.servlet.api.DeploymentManager;
+import io.undertow.servlet.api.ServletContainer;
+import io.undertow.servlet.api.ServletInfo;
+import io.undertow.servlet.core.ServletContainerImpl;
+import io.undertow.servlet.handlers.ServletPathMatches;
+import io.undertow.util.CopyOnWriteMap;
+
+
+public class UndertowHTTPServerEngine implements ServerEngine {
+
+public static final String DO_NOT_CHECK_URL_PROP = 
"org.apache.cxf.transports.http_undertow.DontCheckUrl";

[4/6] cxf git commit: CXF-6604 - Sporadic ClassCastException in AsymmetricBindingHandler#doSignBeforeEncrypt

2016-12-02 Thread coheigea
CXF-6604 - Sporadic ClassCastException in 
AsymmetricBindingHandler#doSignBeforeEncrypt

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


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

Branch: refs/heads/3.1.x-fixes
Commit: 209908a48735837737a34f8be92aded92e97a26f
Parents: 86a2293
Author: Colm O hEigeartaigh 
Authored: Fri Dec 2 13:30:06 2016 +
Committer: Colm O hEigeartaigh 
Committed: Fri Dec 2 14:10:34 2016 +

--
 .../org/apache/cxf/staxutils/StaxUtils.java |  2 +-
 .../policyhandlers/AbstractBindingBuilder.java  | 20 
 2 files changed, 21 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/209908a4/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
--
diff --git a/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java 
b/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
index d307b04..7f29345 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
@@ -95,7 +95,7 @@ import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.message.Message;
 
 public final class StaxUtils {
-// System properies for defaults, but also contextual properties usable
+// System properties for defaults, but also contextual properties usable
 // for StaxInInterceptor
 public static final String MAX_CHILD_ELEMENTS = 
 "org.apache.cxf.stax.maxChildElements";

http://git-wip-us.apache.org/repos/asf/cxf/blob/209908a4/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index 1e0d299..d15c3b6 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -41,6 +41,8 @@ import javax.xml.namespace.QName;
 import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPHeader;
 import javax.xml.soap.SOAPMessage;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
 import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathConstants;
 import javax.xml.xpath.XPathExpressionException;
@@ -48,6 +50,7 @@ import javax.xml.xpath.XPathFactory;
 
 import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
@@ -63,6 +66,8 @@ import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.rt.security.utils.SecurityUtils;
 import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.staxutils.StaxUtils;
+import org.apache.cxf.staxutils.W3CDOMStreamWriter;
 import org.apache.cxf.ws.policy.AssertionInfo;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
 import org.apache.cxf.ws.policy.PolicyConstants;
@@ -608,8 +613,23 @@ public abstract class AbstractBindingBuilder extends 
AbstractCommonBindingHandle
 }
 
 protected Element cloneElement(Element el) {
+<<< HEAD
 if 
(!secHeader.getSecurityHeader().getOwnerDocument().equals(el.getOwnerDocument()))
 {
 return 
(Element)secHeader.getSecurityHeader().getOwnerDocument().importNode(el, true);
+===
+Document doc = secHeader.getSecurityHeaderElement().getOwnerDocument();
+if (!doc.equals(el.getOwnerDocument())) {
+
+XMLStreamReader reader = StaxUtils.createXMLStreamReader(el);
+DocumentFragment fragment = doc.createDocumentFragment();
+W3CDOMStreamWriter writer = new W3CDOMStreamWriter(fragment);
+try {
+StaxUtils.copy(reader, writer);
+return (Element)fragment.getFirstChild();
+} catch (XMLStreamException ex) {
+LOG.log(Level.FINE, "Error cloning security element", ex);
+}
+>>> 66e97c7... CXF-6604 - Sporadic ClassCastException in 
AsymmetricBindingHandler#doSignBeforeEncrypt
 }
 return el;
 }



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

2016-12-02 Thread coheigea
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/30c2ad01
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/30c2ad01
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/30c2ad01

Branch: refs/heads/3.1.x-fixes
Commit: 30c2ad01145045b01c68dff3a1e9bb5a79324407
Parents: eeab95c
Author: Colm O hEigeartaigh 
Authored: Fri Dec 2 14:10:00 2016 +
Committer: Colm O hEigeartaigh 
Committed: Fri Dec 2 14:10:00 2016 +

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/30c2ad01/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 77bef9e..0b38f9c 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -218,6 +218,7 @@ M 9d3c46e0cfe87700d7105ee131c3e3e33f228e06
 M 9ecea375930d1a217f35da65e0d6073f7a80bf7d
 M a034e5853484a7ef0a9f0ad1ae6582178f622f31
 M a1710bdd783afcd667d9e72ccb031480d3806850
+M a644c5d06c0bae321e2c669efa0cecf3abdd944d
 M a89ca98653b95bcd2ab5cadbe9a419a4cec4893a
 M a9fe8470ce9522f08c298e58f76636c48d57b7a4
 M abcc137cb9b27e0da0b4270a18ac2a32df1e9990



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

2016-12-02 Thread coheigea
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/31bdc015
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/31bdc015
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/31bdc015

Branch: refs/heads/3.1.x-fixes
Commit: 31bdc0159c5a9abf4beb0e20dcc7a9a2e05b7124
Parents: 209908a
Author: Colm O hEigeartaigh 
Authored: Fri Dec 2 14:10:34 2016 +
Committer: Colm O hEigeartaigh 
Committed: Fri Dec 2 14:10:34 2016 +

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/31bdc015/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 0b38f9c..59cc9bb 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -192,6 +192,7 @@ M 5b7b014cc1d24cba1191bc07fd48b13dbf4d4391
 M 5cff82c735c7543ce6dfb6c52ac72f583dbb5d22
 M 6242c682dfce4a2ba4869978c28b14f1472484c1
 M 63a1088a9253da0452497440e900d35a5415c3c9
+M 66e97c77eaa43ab3a2cd95f0edc6a27e7445e8ce
 M 6becb31c62ef0845a5078f4ec2124fe7bc264e58
 M 7304dfbd8f3044d8d46981abf2058c6cb732d219
 M 746914a5084f5db8d0c0f052802c7ef2217b9b6b



cxf git commit: CXF-6604 - Sporadic ClassCastException in AsymmetricBindingHandler#doSignBeforeEncrypt

2016-12-02 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master a644c5d06 -> 66e97c77e


CXF-6604 - Sporadic ClassCastException in 
AsymmetricBindingHandler#doSignBeforeEncrypt


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

Branch: refs/heads/master
Commit: 66e97c77eaa43ab3a2cd95f0edc6a27e7445e8ce
Parents: a644c5d
Author: Colm O hEigeartaigh 
Authored: Fri Dec 2 13:30:06 2016 +
Committer: Colm O hEigeartaigh 
Committed: Fri Dec 2 13:30:06 2016 +

--
 .../java/org/apache/cxf/staxutils/StaxUtils.java |  2 +-
 .../policyhandlers/AbstractBindingBuilder.java   | 19 +--
 2 files changed, 18 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/66e97c77/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
--
diff --git a/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java 
b/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
index d307b04..7f29345 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
@@ -95,7 +95,7 @@ import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.message.Message;
 
 public final class StaxUtils {
-// System properies for defaults, but also contextual properties usable
+// System properties for defaults, but also contextual properties usable
 // for StaxInInterceptor
 public static final String MAX_CHILD_ELEMENTS = 
 "org.apache.cxf.stax.maxChildElements";

http://git-wip-us.apache.org/repos/asf/cxf/blob/66e97c77/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
--
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index cf4333d..66de78c 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -41,6 +41,8 @@ import javax.xml.namespace.QName;
 import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPHeader;
 import javax.xml.soap.SOAPMessage;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
 import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathConstants;
 import javax.xml.xpath.XPathExpressionException;
@@ -48,6 +50,7 @@ import javax.xml.xpath.XPathFactory;
 
 import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
@@ -63,6 +66,8 @@ import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.rt.security.utils.SecurityUtils;
 import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.staxutils.StaxUtils;
+import org.apache.cxf.staxutils.W3CDOMStreamWriter;
 import org.apache.cxf.ws.policy.AssertionInfo;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
 import org.apache.cxf.ws.policy.PolicyConstants;
@@ -608,8 +613,18 @@ public abstract class AbstractBindingBuilder extends 
AbstractCommonBindingHandle
 }
 
 protected Element cloneElement(Element el) {
-if 
(!secHeader.getSecurityHeaderElement().getOwnerDocument().equals(el.getOwnerDocument()))
 {
-return 
(Element)secHeader.getSecurityHeaderElement().getOwnerDocument().importNode(el, 
true);
+Document doc = secHeader.getSecurityHeaderElement().getOwnerDocument();
+if (!doc.equals(el.getOwnerDocument())) {
+
+XMLStreamReader reader = StaxUtils.createXMLStreamReader(el);
+DocumentFragment fragment = doc.createDocumentFragment();
+W3CDOMStreamWriter writer = new W3CDOMStreamWriter(fragment);
+try {
+StaxUtils.copy(reader, writer);
+return (Element)fragment.getFirstChild();
+} catch (XMLStreamException ex) {
+LOG.log(Level.FINE, "Error cloning security element", ex);
+}
 }
 return el;
 }



cxf git commit: Findbugs work on the transports

2016-12-02 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master 847216a39 -> a644c5d06


Findbugs work on the transports


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

Branch: refs/heads/master
Commit: a644c5d06c0bae321e2c669efa0cecf3abdd944d
Parents: 847216a
Author: Colm O hEigeartaigh 
Authored: Fri Dec 2 11:12:23 2016 +
Committer: Colm O hEigeartaigh 
Committed: Fri Dec 2 11:54:36 2016 +

--
 .../http_undertow/UndertowHTTPServerEngine.java|  4 ++--
 .../java/org/apache/cxf/transport/http/Headers.java|  2 +-
 .../org/apache/cxf/transport/http/ProxyFactory.java|  2 +-
 .../http/auth/AbstractSpnegoAuthSupplier.java  |  2 +-
 .../apache/cxf/transport/http/auth/HttpAuthHeader.java |  7 ---
 .../http/osgi/ConfigAdminHttpConduitConfigurer.java|  2 +-
 .../java/org/apache/cxf/transport/jms/JMSConduit.java  |  2 +-
 .../org/apache/cxf/transport/jms/uri/JMSEndpoint.java  | 13 +++--
 .../atmosphere/DefaultProtocolInterceptor.java |  2 +-
 9 files changed, 19 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/a644c5d0/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
--
diff --git 
a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
 
b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
index 7cfed67..ad3a6a6 100644
--- 
a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
+++ 
b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
@@ -461,11 +461,11 @@ public class UndertowHTTPServerEngine implements 
ServerEngine {
 ? SSLContext.getInstance(proto)
 : SSLContext.getInstance(proto, 
tlsServerParameters.getJsseProvider());
 
-KeyManager keyManagers[] = tlsServerParameters.getKeyManagers();
+KeyManager[] keyManagers = tlsServerParameters.getKeyManagers();
 if (tlsServerParameters.getCertAlias() != null) {
 keyManagers = getKeyManagersWithCertAlias(keyManagers);
 }
-context.init(tlsServerParameters.getKeyManagers(), 
+context.init(keyManagers, 
  tlsServerParameters.getTrustManagers(),
  tlsServerParameters.getSecureRandom());
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/a644c5d0/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
--
diff --git 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
index 7ec9f4a..3d58112 100644
--- 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
+++ 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
@@ -487,7 +487,7 @@ public class Headers {
 return true;
 }
 try {
-if (Integer.valueOf(ctLen.get(0)) == 0) {
+if (Integer.parseInt(ctLen.get(0)) == 0) {
 return false;
 }
 } catch (NumberFormatException ex) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/a644c5d0/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
--
diff --git 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
index 22779db..c53794d 100644
--- 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
+++ 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
@@ -79,7 +79,7 @@ public class ProxyFactory {
 proxyPort = "8080";
 }
 
-
systemProxyConfiguration.setProxyServerPort(Integer.valueOf(proxyPort));
+
systemProxyConfiguration.setProxyServerPort(Integer.parseInt(proxyPort));
 
 // Load non proxy hosts
 String nonProxyHosts = 
SystemPropertyAction.getPropertyOrNull(HTTP_NON_PROXY_HOSTS);

http://git-wip-us.apache.org/repos/asf/cxf/blob/a644c5d0/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/AbstractSpnegoAuthSupplier.java

cxf-fediz git commit: Adding SAML SSO federation test

2016-12-02 Thread coheigea
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 18ea6f481 -> 02cbf5a26


Adding SAML SSO federation test


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

Branch: refs/heads/master
Commit: 02cbf5a2619fca7dfabf9917ee2a0e3f44a6fb17
Parents: 18ea6f4
Author: Colm O hEigeartaigh 
Authored: Fri Dec 2 12:59:32 2016 +
Committer: Colm O hEigeartaigh 
Committed: Fri Dec 2 12:59:32 2016 +

--
 .../cxf/fediz/integrationtests/SAMLSSOTest.java | 70 +---
 .../test/resources/realma/entities-realma.xml   | 31 +++--
 .../src/test/resources/rp/cxf-service.xml   | 39 +--
 3 files changed, 117 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/02cbf5a2/systests/federation/samlsso/src/test/java/org/apache/cxf/fediz/integrationtests/SAMLSSOTest.java
--
diff --git 
a/systests/federation/samlsso/src/test/java/org/apache/cxf/fediz/integrationtests/SAMLSSOTest.java
 
b/systests/federation/samlsso/src/test/java/org/apache/cxf/fediz/integrationtests/SAMLSSOTest.java
index 45ddb8d..61f79d6 100644
--- 
a/systests/federation/samlsso/src/test/java/org/apache/cxf/fediz/integrationtests/SAMLSSOTest.java
+++ 
b/systests/federation/samlsso/src/test/java/org/apache/cxf/fediz/integrationtests/SAMLSSOTest.java
@@ -148,18 +148,10 @@ public class SAMLSSOTest {
 server.addWebapp("/idpoidc", idpWebapp.getAbsolutePath());
 } else {
 File rpWebapp = new File(baseDir + File.separator + 
server.getHost().getAppBase(), "samlssoWebapp");
-server.addWebapp("/wsfed", rpWebapp.getAbsolutePath());
+server.addWebapp("/samlsso", rpWebapp.getAbsolutePath());
 
 /*
 rpWebapp = new File(baseDir + File.separator + 
server.getHost().getAppBase(), "simpleWebapp");
-cxt = server.addWebapp("/samlssocustom", 
rpWebapp.getAbsolutePath());
-cxt.getPipeline().addValve(fa);
-
-rpWebapp = new File(baseDir + File.separator + 
server.getHost().getAppBase(), "simpleWebapp");
-cxt = server.addWebapp("/samlssocustompost", 
rpWebapp.getAbsolutePath());
-cxt.getPipeline().addValve(fa);
-
-rpWebapp = new File(baseDir + File.separator + 
server.getHost().getAppBase(), "simpleWebapp");
 cxt = server.addWebapp("/oidc", rpWebapp.getAbsolutePath());
 cxt.getPipeline().addValve(fa);
 */
@@ -210,7 +202,7 @@ public class SAMLSSOTest {
 
 @org.junit.Test
 public void testWSFederation() throws Exception {
-String url = "https://localhost:; + getRpHttpsPort() + 
"/wsfed/app1/services/25";
+String url = "https://localhost:; + getRpHttpsPort() + 
"/samlsso/app1/services/25";
 //System.out.println(url);
 //Thread.sleep(60 * 2 * 1000);
 
@@ -223,6 +215,20 @@ public class SAMLSSOTest {
 Assert.assertTrue(bodyTextContent.contains("This is the double number 
response"));
 
 }
+
+@org.junit.Test
+public void testSAMLSSOFedizIdP() throws Exception {
+String url = "https://localhost:; + getRpHttpsPort() + 
"/samlsso/app2/services/25";
+// System.out.println(url);
+// Thread.sleep(60 * 2 * 1000);
+String user = "ALICE";  // realm b credentials
+String password = "ECILA";
+
+final String bodyTextContent = 
+login(url, user, password, getIdpRealmbHttpsPort(), 
getIdpHttpsPort(), true);
+
+Assert.assertTrue(bodyTextContent.contains("This is the double number 
response"));
+}
 
 private static String login(String url, String user, String password, 
 String idpPort, String rpIdpPort) throws 
IOException {
@@ -262,4 +268,48 @@ public class SAMLSSOTest {
 webClient.close();
 return rpPage.asXml();
 }
+
+private static String login(String url, String user, String password, 
+String idpPort, String rpIdpPort, boolean 
postBinding) throws IOException {
+//
+// Access the RP + get redirected to the IdP for "realm a". Then get 
redirected to the IdP for
+// "realm b".
+//
+final WebClient webClient = new WebClient();
+CookieManager cookieManager = new CookieManager();
+webClient.setCookieManager(cookieManager);
+webClient.getOptions().setUseInsecureSSL(true);
+