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

jamesnetherton pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/camel-main by this push:
     new 83a01bb6b9 Fix ical dataformat in native mode
83a01bb6b9 is described below

commit 83a01bb6b94970b945689107859f597634fd28a9
Author: James Netherton <[email protected]>
AuthorDate: Mon Jun 24 08:42:50 2024 +0100

    Fix ical dataformat in native mode
---
 .../camel/quarkus/component/ical/deployment/IcalProcessor.java       | 5 ++++-
 integration-tests/dataformat/pom.xml                                 | 3 +--
 .../apache/camel/quarkus/component/dataformat/it/DataformatIT.java   | 2 --
 .../apache/camel/quarkus/component/dataformat/it/DataformatTest.java | 3 +++
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git 
a/extensions/ical/deployment/src/main/java/org/apache/camel/quarkus/component/ical/deployment/IcalProcessor.java
 
b/extensions/ical/deployment/src/main/java/org/apache/camel/quarkus/component/ical/deployment/IcalProcessor.java
index 5ae52c557c..f928511cec 100644
--- 
a/extensions/ical/deployment/src/main/java/org/apache/camel/quarkus/component/ical/deployment/IcalProcessor.java
+++ 
b/extensions/ical/deployment/src/main/java/org/apache/camel/quarkus/component/ical/deployment/IcalProcessor.java
@@ -26,6 +26,7 @@ import 
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceDirectoryB
 import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
 import 
io.quarkus.deployment.builditem.nativeimage.RuntimeReinitializedClassBuildItem;
 import net.fortuna.ical4j.model.TimeZoneLoader;
+import net.fortuna.ical4j.model.TimeZoneRegistryImpl;
 import net.fortuna.ical4j.util.MapTimeZoneCache;
 
 class IcalProcessor {
@@ -64,7 +65,9 @@ class IcalProcessor {
     @BuildStep
     void registerForReflection(BuildProducer<ReflectiveClassBuildItem> 
reflectiveClass) {
         reflectiveClass
-                
.produce(ReflectiveClassBuildItem.builder(MapTimeZoneCache.class).build());
+                .produce(ReflectiveClassBuildItem.builder(
+                        MapTimeZoneCache.class,
+                        TimeZoneRegistryImpl.class).build());
     }
 
     @BuildStep
diff --git a/integration-tests/dataformat/pom.xml 
b/integration-tests/dataformat/pom.xml
index 0914a75bb8..bb1c87f5f7 100644
--- a/integration-tests/dataformat/pom.xml
+++ b/integration-tests/dataformat/pom.xml
@@ -67,7 +67,6 @@
 
 
     <profiles>
-<!--        https://github.com/apache/camel-quarkus/issues/6218
           <profile>
             <id>native</id>
             <activation>
@@ -94,7 +93,7 @@
                     </plugin>
                 </plugins>
             </build>
-        </profile>-->
+        </profile>
         <profile>
             <id>virtualDependencies</id>
             <activation>
diff --git 
a/integration-tests/dataformat/src/test/java/org/apache/camel/quarkus/component/dataformat/it/DataformatIT.java
 
b/integration-tests/dataformat/src/test/java/org/apache/camel/quarkus/component/dataformat/it/DataformatIT.java
index 441d53bb66..8676954dce 100644
--- 
a/integration-tests/dataformat/src/test/java/org/apache/camel/quarkus/component/dataformat/it/DataformatIT.java
+++ 
b/integration-tests/dataformat/src/test/java/org/apache/camel/quarkus/component/dataformat/it/DataformatIT.java
@@ -17,9 +17,7 @@
 package org.apache.camel.quarkus.component.dataformat.it;
 
 import io.quarkus.test.junit.QuarkusIntegrationTest;
-import org.junit.jupiter.api.Disabled;
 
-@Disabled //https://github.com/apache/camel-quarkus/issues/6218
 @QuarkusIntegrationTest
 class DataformatIT extends DataformatTest {
 
diff --git 
a/integration-tests/dataformat/src/test/java/org/apache/camel/quarkus/component/dataformat/it/DataformatTest.java
 
b/integration-tests/dataformat/src/test/java/org/apache/camel/quarkus/component/dataformat/it/DataformatTest.java
index c249c5fb9b..f2cf856cba 100644
--- 
a/integration-tests/dataformat/src/test/java/org/apache/camel/quarkus/component/dataformat/it/DataformatTest.java
+++ 
b/integration-tests/dataformat/src/test/java/org/apache/camel/quarkus/component/dataformat/it/DataformatTest.java
@@ -99,6 +99,9 @@ class DataformatTest {
 
     static String toFormatedLocalDateTime(ZonedDateTime zonedDateTime) {
         String result = 
zonedDateTime.format(DateTimeFormatter.ofPattern("yyyyMMdd'T'hhmmss"));
+        if (zonedDateTime.getZone().getId().equals("Etc/UTC")) {
+            result += "Z";
+        }
         return result;
     }
 

Reply via email to