[camel] branch master updated (76c2d90 -> 2231128)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[camel] branch master updated (76c2d90 -> 2231128)

acosentino
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 76c2d90  CAMEL-12069: ActiveMQ/JMS component: transferExchange option does not transfer exchange properties anymore (closes #2139)
     new c91031f  CAMEL-10613: Upgrade to restlet 2.3.12
     new 2231128  CAMEL-10613: Fixed CS

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../component/restlet/DefaultRestletBinding.java   |  6 ++++++
 parent/pom.xml                                     |  5 +----
 .../karaf/features/src/main/resources/features.xml | 24 +++++++++++-----------
 3 files changed, 19 insertions(+), 16 deletions(-)

--
To stop receiving notification emails like this one, please contact
['"[hidden email]" <[hidden email]>'].
Reply | Threaded
Open this post in threaded view
|

[camel] 01/02: CAMEL-10613: Upgrade to restlet 2.3.12

acosentino
This is an automated email from the ASF dual-hosted git repository.

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

commit c91031fd83060ce5190d54c69a97b8f0cd64e2c2
Author: Andrea Cosentino <[hidden email]>
AuthorDate: Thu Dec 7 08:38:12 2017 +0100

    CAMEL-10613: Upgrade to restlet 2.3.12
---
 .../component/restlet/DefaultRestletBinding.java   |  6 ++++++
 .../component/restlet/RestRestletCorsTest.java     |  1 +
 parent/pom.xml                                     |  5 +----
 .../karaf/features/src/main/resources/features.xml | 24 +++++++++++-----------
 4 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
index 46d9ddc..ecd8453 100644
--- a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
+++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
@@ -400,6 +400,7 @@ public class DefaultRestletBinding implements RestletBinding, HeaderFilterStrate
             String key = h.getName();
             String value = h.getValue();
 
+
             // ignore these headers
             if ("Host".equalsIgnoreCase(key) || "Accept".equalsIgnoreCase(key) || "Accept-encoding".equalsIgnoreCase(key)
                 || "User-Agent".equalsIgnoreCase(key) || "Referer".equalsIgnoreCase(key) || "Connection".equalsIgnoreCase(key)
@@ -428,6 +429,11 @@ public class DefaultRestletBinding implements RestletBinding, HeaderFilterStrate
                 if (d != null) {
                     response.setDate(d);
                 }
+            } else if ("Access-Control-Max-Age".equalsIgnoreCase(key)) {
+             Integer accessControlMaxAge = exchange.getContext().getTypeConverter().tryConvertTo(Integer.class, exchange, value);
+                if (accessControlMaxAge != null) {
+                    response.setAccessControlMaxAge(accessControlMaxAge);
+                }
             } else {
                 // TODO: implement all the other restlet standard headers
                 LOG.warn("Addition of the standard response header \"{}\" is not allowed. Please use the equivalent property in the Restlet API.", key);
diff --git a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestRestletCorsTest.java b/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestRestletCorsTest.java
index 0a66c29..7981032 100644
--- a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestRestletCorsTest.java
+++ b/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestRestletCorsTest.java
@@ -40,6 +40,7 @@ public class RestRestletCorsTest extends RestletTestSupport {
             }
         });
 
+        System.out.println(out.getOut().getHeaders().toString());
         assertEquals("https://localhost:443", out.getOut().getHeader("Access-Control-Allow-Origin"));
         assertEquals("GET, POST, PUT, DELETE, OPTIONS", out.getOut().getHeader("Access-Control-Allow-Methods"));
         assertEquals("Origin, Accept, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers",
diff --git a/parent/pom.xml b/parent/pom.xml
index f30315c..27cba82 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -582,12 +582,9 @@
     <reflections-bundle-version>0.9.11_1</reflections-bundle-version>
     <regexp-bundle-version>1.4_1</regexp-bundle-version>
     <rest-assured-version>3.0.6</rest-assured-version>
-    <restlet-version>2.3.6</restlet-version>
-    <restlet-jackson-version>2.4.4</restlet-jackson-version>
+    <restlet-version>2.3.12</restlet-version>
     <restlet-woodstox-version>4.3.0</restlet-woodstox-version>
     <restlet-yaml-version>1.13</restlet-yaml-version>
-    <restlet-gson-version>2.4</restlet-gson-version>
-    <restlet-joda-time-version>2.3</restlet-joda-time-version>
     <rhino-bundle-version>1.7.7.1_1</rhino-bundle-version>
     <rhino-version>1.7.7.1</rhino-version>
     <rhino-js-version>1.7R2</rhino-js-version>
diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml
index 212e1e2..b27bda1 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -1806,22 +1806,22 @@
     <feature version='${project.version}'>camel-restlet</feature>
     <bundle dependency='true'>mvn:org.codehaus.woodstox/stax2-api/${stax2-api-bundle-version}</bundle>
     <bundle dependency='true'>mvn:org.codehaus.woodstox/woodstox-core-asl/${restlet-woodstox-version}</bundle>
-    <bundle dependency='true'>mvn:org.yaml/snakeyaml/${restlet-yaml-version}</bundle>
-    <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-core/${restlet-jackson-version}</bundle>
-    <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-databind/${restlet-jackson-version}</bundle>
-    <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-annotations/${restlet-jackson-version}</bundle>
-    <bundle dependency='true'>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-csv/${restlet-jackson-version}</bundle>
-    <bundle dependency='true'>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-smile/${restlet-jackson-version}</bundle>
-    <bundle dependency='true'>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-xml/${restlet-jackson-version}</bundle>
-    <bundle dependency='true'>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/${restlet-jackson-version}</bundle>
-    <bundle dependency='true'>mvn:com.fasterxml.jackson.module/jackson-module-jaxb-annotations/${restlet-jackson-version}</bundle>
-    <bundle dependency='true'>mvn:com.fasterxml.jackson.module/jackson-module-jsonSchema/${restlet-jackson-version}</bundle>
+    <bundle dependency='true'>mvn:org.yaml/snakeyaml/${snakeyaml-version}</bundle>
+    <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-core/${jackson2-version}</bundle>
+    <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-databind/${jackson2-version}</bundle>
+    <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson2-version}</bundle>
+    <bundle dependency='true'>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-csv/${jackson2-version}</bundle>
+    <bundle dependency='true'>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-smile/${jackson2-version}</bundle>
+    <bundle dependency='true'>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-xml/${jackson2-version}</bundle>
+    <bundle dependency='true'>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/${jackson2-version}</bundle>
+    <bundle dependency='true'>mvn:com.fasterxml.jackson.module/jackson-module-jaxb-annotations/${jackson2-version}</bundle>
+    <bundle dependency='true'>mvn:com.fasterxml.jackson.module/jackson-module-jsonSchema/${jackson2-version}</bundle>
     <bundle>mvn:http://maven.restlet.org@id=restlet!org.restlet.osgi/org.restlet.ext.jackson/${restlet-version}</bundle>
   </feature>
   <feature name='camel-restlet-gson' version='${project.version}' resolver='(obr)' start-level='50'>
     <feature version='${project.version}'>camel-restlet</feature>
-    <bundle dependency='true'>mvn:joda-time/joda-time/${restlet-joda-time-version}</bundle>
-    <bundle dependency='true'>mvn:com.google.code.gson/gson/${restlet-gson-version}</bundle>
+    <bundle dependency='true'>mvn:joda-time/joda-time/${jodatime2-bundle-version}</bundle>
+    <bundle dependency='true'>mvn:com.google.code.gson/gson/${gson-version}</bundle>
     <bundle>mvn:http://maven.restlet.org@id=restlet!org.restlet.osgi/org.restlet.ext.gson/${restlet-version}</bundle>
   </feature>
   <feature name='camel-rmi' version='${project.version}' resolver='(obr)' start-level='50'>

--
To stop receiving notification emails like this one, please contact
"[hidden email]" <[hidden email]>.
Reply | Threaded
Open this post in threaded view
|

[camel] 02/02: CAMEL-10613: Fixed CS

acosentino
In reply to this post by acosentino
This is an automated email from the ASF dual-hosted git repository.

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

commit 223112823a3f391c2e7ccaa3c670a2d149728124
Author: Andrea Cosentino <[hidden email]>
AuthorDate: Thu Dec 7 09:03:10 2017 +0100

    CAMEL-10613: Fixed CS
---
 .../java/org/apache/camel/component/restlet/DefaultRestletBinding.java  | 2 +-
 .../java/org/apache/camel/component/restlet/RestRestletCorsTest.java    | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
index ecd8453..f85225a 100644
--- a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
+++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
@@ -430,7 +430,7 @@ public class DefaultRestletBinding implements RestletBinding, HeaderFilterStrate
                     response.setDate(d);
                 }
             } else if ("Access-Control-Max-Age".equalsIgnoreCase(key)) {
-             Integer accessControlMaxAge = exchange.getContext().getTypeConverter().tryConvertTo(Integer.class, exchange, value);
+                Integer accessControlMaxAge = exchange.getContext().getTypeConverter().tryConvertTo(Integer.class, exchange, value);
                 if (accessControlMaxAge != null) {
                     response.setAccessControlMaxAge(accessControlMaxAge);
                 }
diff --git a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestRestletCorsTest.java b/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestRestletCorsTest.java
index 7981032..0a66c29 100644
--- a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestRestletCorsTest.java
+++ b/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestRestletCorsTest.java
@@ -40,7 +40,6 @@ public class RestRestletCorsTest extends RestletTestSupport {
             }
         });
 
-        System.out.println(out.getOut().getHeaders().toString());
         assertEquals("https://localhost:443", out.getOut().getHeader("Access-Control-Allow-Origin"));
         assertEquals("GET, POST, PUT, DELETE, OPTIONS", out.getOut().getHeader("Access-Control-Allow-Methods"));
         assertEquals("Origin, Accept, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers",

--
To stop receiving notification emails like this one, please contact
"[hidden email]" <[hidden email]>.