Skip to content

Commit

Permalink
Fix ical dataformat in native mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed Jun 24, 2024
1 parent 3452843 commit 83a01bb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
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 {
Expand Down Expand Up @@ -64,7 +65,9 @@ void nativeResources(
@BuildStep
void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClass) {
reflectiveClass
.produce(ReflectiveClassBuildItem.builder(MapTimeZoneCache.class).build());
.produce(ReflectiveClassBuildItem.builder(
MapTimeZoneCache.class,
TimeZoneRegistryImpl.class).build());
}

@BuildStep
Expand Down
3 changes: 1 addition & 2 deletions integration-tests/dataformat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@


<profiles>
<!-- https://github.com/apache/camel-quarkus/issues/6218
<profile>
<id>native</id>
<activation>
Expand All @@ -94,7 +93,7 @@
</plugin>
</plugins>
</build>
</profile>-->
</profile>
<profile>
<id>virtualDependencies</id>
<activation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ public void ical() throws ParseException, IOException {

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;
}

Expand Down

0 comments on commit 83a01bb

Please sign in to comment.