buildbot success in on cxf-site-production

2019-06-21 Thread buildbot
The Buildbot has detected a restored build on builder cxf-site-production while 
building . Full details are available at:
https://ci.apache.org/builders/cxf-site-production/builds/33214

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb-cms-slave

Build Reason: The Nightly scheduler named 'cxf-site-production' triggered this 
build
Build Source Stamp: [branch cxf/web] HEAD
Blamelist: 

Build succeeded!

Sincerely,
 -The Buildbot





[cxf] branch 3.1.x-fixes updated (9e44530 -> 92b516e)

2019-06-21 Thread reta
This is an automated email from the ASF dual-hosted git repository.

reta pushed a change to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git.


from 9e44530  Fixing failing tests due to cert expiration
 add 92b516e  CXF-8059: @FormParam inside @BeanParam not working

No new revisions were added by this update.

Summary of changes:
 .../apache/cxf/jaxrs/client/ClientProxyImpl.java   | 20 +-
 .../org/apache/cxf/systest/jaxrs/BookStore.java| 82 +-
 .../systest/jaxrs/JAXRSClientServerBookTest.java   | 40 ++-
 3 files changed, 137 insertions(+), 5 deletions(-)



buildbot failure in on cxf-site-production

2019-06-21 Thread buildbot
The Buildbot has detected a new failure on builder cxf-site-production while 
building . Full details are available at:
https://ci.apache.org/builders/cxf-site-production/builds/33213

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb-cms-slave

Build Reason: The Nightly scheduler named 'cxf-site-production' triggered this 
build
Build Source Stamp: [branch cxf/web] HEAD
Blamelist: 

BUILD FAILED: failed compile

Sincerely,
 -The Buildbot





[cxf] branch 3.2.x-fixes updated: CXF-8059: @FormParam inside @BeanParam not working

2019-06-21 Thread reta
This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/3.2.x-fixes by this push:
 new 78a9fb7  CXF-8059: @FormParam inside @BeanParam not working
78a9fb7 is described below

commit 78a9fb79de48750640d20637869880b3e92ae3b4
Author: reta 
AuthorDate: Fri Jun 21 11:27:13 2019 -0400

CXF-8059: @FormParam inside @BeanParam not working
---
 .../apache/cxf/jaxrs/client/ClientProxyImpl.java   | 18 -
 .../org/apache/cxf/systest/jaxrs/BookStore.java| 80 +-
 .../systest/jaxrs/JAXRSClientServerBookTest.java   | 36 ++
 3 files changed, 132 insertions(+), 2 deletions(-)

diff --git 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
index 6aaee1c..3b7a345 100644
--- 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
+++ 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
@@ -41,6 +41,7 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.ResourceBundle;
+import java.util.function.Predicate;
 import java.util.logging.Logger;
 import java.util.stream.Collectors;
 
@@ -286,8 +287,10 @@ public class ClientProxyImpl extends AbstractClient 
implements
 body = handleForm(m, params, types, beanParamsList);
 } else if (types.containsKey(ParameterType.REQUEST_BODY))  {
 body = handleMultipart(types, ori, params);
+} else if (hasFormParams(params, beanParamsList)) {
+body = handleForm(m, params, types, beanParamsList);
 }
-
+
 setRequestHeaders(headers, ori, types.containsKey(ParameterType.FORM),
 body == null ? null : body.getClass(), m.getReturnType());
 
@@ -996,6 +999,19 @@ public class ClientProxyImpl extends AbstractClient 
implements
 return aMethod == null || bodyIndex == -1 ? new Annotation[0]
 : aMethod.getParameterAnnotations()[bodyIndex];
 }
+
+/**
+ * Checks if @BeanParam object has at least one @FormParam declaration.
+ * @param params parameter values
+ * @param beanParams bean parameters
+ * @return "true" @BeanParam object has at least one @FormParam, "false" 
otherwise
+ */
+private boolean hasFormParams(Object[] params, List beanParams) 
{
+return beanParams
+.stream()
+.map(p -> getValuesFromBeanParam(params[p.getIndex()], 
FormParam.class))
+.anyMatch(((Predicate>) 
Map::isEmpty).negate());
+}
 
 protected class BodyWriter extends AbstractBodyWriter {
 
diff --git 
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java 
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
index f73df80..bfa5851 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
@@ -47,6 +47,7 @@ import javax.ws.rs.CookieParam;
 import javax.ws.rs.DELETE;
 import javax.ws.rs.DefaultValue;
 import javax.ws.rs.Encoded;
+import javax.ws.rs.FormParam;
 import javax.ws.rs.GET;
 import javax.ws.rs.HEAD;
 import javax.ws.rs.HeaderParam;
@@ -399,11 +400,55 @@ public class BookStore {
 
 long id = bean1.getId() + bean1.getId2() + bean1.getId3();
 if (bean2.getId4() != id) {
-throw new RuntimeException();
+throw new RuntimeException("id4 != id");
+}
+return books.get(id);
+}
+
+@POST
+@Path("/formBeanParams/{id}")
+@Produces("application/xml")
+public Book postFormBeanParamsBook(@BeanParam BookBeanForm bean) {
+long id = bean.getId() + bean.getId2();
+if (bean.getId3() != id) {
+throw new RuntimeException("id3 != id");
+}
+return books.get(id);
+}
+
+@POST
+@Path("/formParams/{id}")
+@Produces("application/xml")
+public Book postFormParamsBook(@PathParam("id") long id, 
@QueryParam("id2") long id2, @FormParam("id3") long id3) {
+long theBookId = id + id2;
+if (id3 != theBookId) {
+throw new RuntimeException("id3 != id");
+}
+return books.get(theBookId);
+}
+
+@GET
+@Path("/formBeanParams/{id}")
+@Produces("application/xml")
+public Book getFormBeanParamsBook(@BeanParam BookBeanForm bean) {
+long id = bean.getId() + bean.getId2();
+if (bean.getId3() != 0) {
+throw new RuntimeException("id3 != 0");
 }
 return books.get(id);
 }
 
+@GET
+@Path("/formParams/{id}")
+@Produces("application/xml")
+public Book getFormParamsBook(@PathParam("id") long id, @QueryParam("id2") 
long id2, @FormParam("id3") long id3) {
+long theBookId = id + id2;
+

[cxf] branch master updated: CXF-8059: @FormParam inside @BeanParam not working

2019-06-21 Thread reta
This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
 new 510caef  CXF-8059: @FormParam inside @BeanParam not working
510caef is described below

commit 510caef2b3960241dd95b95eaab7bac9a14076f4
Author: reta 
AuthorDate: Fri Jun 21 11:27:13 2019 -0400

CXF-8059: @FormParam inside @BeanParam not working
---
 .../apache/cxf/jaxrs/client/ClientProxyImpl.java   | 18 -
 .../org/apache/cxf/systest/jaxrs/BookStore.java| 80 +-
 .../systest/jaxrs/JAXRSClientServerBookTest.java   | 36 ++
 3 files changed, 132 insertions(+), 2 deletions(-)

diff --git 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
index 15dfc90..903d5a0 100644
--- 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
+++ 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
@@ -43,6 +43,7 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.ResourceBundle;
+import java.util.function.Predicate;
 import java.util.logging.Logger;
 import java.util.stream.Collectors;
 
@@ -323,8 +324,10 @@ public class ClientProxyImpl extends AbstractClient 
implements
 body = handleForm(m, params, types, beanParamsList);
 } else if (types.containsKey(ParameterType.REQUEST_BODY))  {
 body = handleMultipart(types, ori, params);
+} else if (hasFormParams(params, beanParamsList)) {
+body = handleForm(m, params, types, beanParamsList);
 }
-
+
 setRequestHeaders(headers, ori, types.containsKey(ParameterType.FORM),
 body == null ? null : body.getClass(), m.getReturnType());
 
@@ -1034,6 +1037,19 @@ public class ClientProxyImpl extends AbstractClient 
implements
 return aMethod == null || bodyIndex == -1 ? new Annotation[0]
 : aMethod.getParameterAnnotations()[bodyIndex];
 }
+
+/**
+ * Checks if @BeanParam object has at least one @FormParam declaration.
+ * @param params parameter values
+ * @param beanParams bean parameters
+ * @return "true" @BeanParam object has at least one @FormParam, "false" 
otherwise
+ */
+private boolean hasFormParams(Object[] params, List beanParams) 
{
+return beanParams
+.stream()
+.map(p -> getValuesFromBeanParam(params[p.getIndex()], 
FormParam.class))
+.anyMatch(((Predicate>) 
Map::isEmpty).negate());
+}
 
 protected class BodyWriter extends AbstractBodyWriter {
 
diff --git 
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java 
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
index 5c6ba99..d4d0cec 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
@@ -47,6 +47,7 @@ import javax.ws.rs.CookieParam;
 import javax.ws.rs.DELETE;
 import javax.ws.rs.DefaultValue;
 import javax.ws.rs.Encoded;
+import javax.ws.rs.FormParam;
 import javax.ws.rs.GET;
 import javax.ws.rs.HEAD;
 import javax.ws.rs.HeaderParam;
@@ -399,11 +400,55 @@ public class BookStore {
 
 long id = bean1.getId() + bean1.getId2() + bean1.getId3();
 if (bean2.getId4() != id) {
-throw new RuntimeException();
+throw new RuntimeException("id4 != id");
+}
+return books.get(id);
+}
+
+@POST
+@Path("/formBeanParams/{id}")
+@Produces("application/xml")
+public Book postFormBeanParamsBook(@BeanParam BookBeanForm bean) {
+long id = bean.getId() + bean.getId2();
+if (bean.getId3() != id) {
+throw new RuntimeException("id3 != id");
+}
+return books.get(id);
+}
+
+@POST
+@Path("/formParams/{id}")
+@Produces("application/xml")
+public Book postFormParamsBook(@PathParam("id") long id, 
@QueryParam("id2") long id2, @FormParam("id3") long id3) {
+long theBookId = id + id2;
+if (id3 != theBookId) {
+throw new RuntimeException("id3 != id");
+}
+return books.get(theBookId);
+}
+
+@GET
+@Path("/formBeanParams/{id}")
+@Produces("application/xml")
+public Book getFormBeanParamsBook(@BeanParam BookBeanForm bean) {
+long id = bean.getId() + bean.getId2();
+if (bean.getId3() != 0) {
+throw new RuntimeException("id3 != 0");
 }
 return books.get(id);
 }
 
+@GET
+@Path("/formParams/{id}")
+@Produces("application/xml")
+public Book getFormParamsBook(@PathParam("id") long id, @QueryParam("id2") 
long id2, @FormParam("id3") long id3) {
+long theBookId = id + id2;
+

buildbot success in on cxf-site-production

2019-06-21 Thread buildbot
The Buildbot has detected a restored build on builder cxf-site-production while 
building . Full details are available at:
https://ci.apache.org/builders/cxf-site-production/builds/33205

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb-cms-slave

Build Reason: The Nightly scheduler named 'cxf-site-production' triggered this 
build
Build Source Stamp: [branch cxf/web] HEAD
Blamelist: 

Build succeeded!

Sincerely,
 -The Buildbot





buildbot failure in on cxf-site-production

2019-06-21 Thread buildbot
The Buildbot has detected a new failure on builder cxf-site-production while 
building . Full details are available at:
https://ci.apache.org/builders/cxf-site-production/builds/33204

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb-cms-slave

Build Reason: The Nightly scheduler named 'cxf-site-production' triggered this 
build
Build Source Stamp: [branch cxf/web] HEAD
Blamelist: 

BUILD FAILED: failed compile

Sincerely,
 -The Buildbot





buildbot success in on cxf-site-production

2019-06-21 Thread buildbot
The Buildbot has detected a restored build on builder cxf-site-production while 
building . Full details are available at:
https://ci.apache.org/builders/cxf-site-production/builds/33203

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb-cms-slave

Build Reason: The Nightly scheduler named 'cxf-site-production' triggered this 
build
Build Source Stamp: [branch cxf/web] HEAD
Blamelist: 

Build succeeded!

Sincerely,
 -The Buildbot





buildbot failure in on cxf-site-production

2019-06-21 Thread buildbot
The Buildbot has detected a new failure on builder cxf-site-production while 
building . Full details are available at:
https://ci.apache.org/builders/cxf-site-production/builds/33202

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb-cms-slave

Build Reason: The Nightly scheduler named 'cxf-site-production' triggered this 
build
Build Source Stamp: [branch cxf/web] HEAD
Blamelist: 

BUILD FAILED: failed compile

Sincerely,
 -The Buildbot