You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "Croway (via GitHub)" <gi...@apache.org> on 2026/03/31 09:34:26 UTC

[PR] Fix generator for java.time.Duration default values [camel-spring-boot]

Croway opened a new pull request, #1736:
URL: https://github.com/apache/camel-spring-boot/pull/1736

   ## Summary
   - The auto-configuration generator assumed duration-type properties always use `long`/`int` Java types
   - Properties with `javaType: "java.time.Duration"` (e.g. `embeddingStoreSchemaRegistrationTimeout` from CAMEL-23255) got a bare `int` literal as initializer, causing `incompatible types: int cannot be converted to java.time.Duration` in the generated `InfinispanRemoteComponentConfiguration.java`
   - Fix: generate `Duration.ofMillis(...)` when the javaType is `java.time.Duration`
   
   ## Context
   Both Camel-Spring-Boot Daily/main (build #46) and Camel-Spring-Boot Daily (ppc64le)/main (build #1460) fail with this compilation error on `camel-infinispan-starter`.
   
   ## Test plan
   - [x] Generator plugin compiles
   - [x] `camel-infinispan-starter` compiles with regenerated code (was failing before)
   - [x] `camel-infinispan-cluster-service-starter` compiles
   - [x] Generated file has correct `Duration.ofMillis(60000)` initializer with proper import


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix generator for java.time.Duration default values [camel-spring-boot]

Posted by "Croway (via GitHub)" <gi...@apache.org>.
Croway merged PR #1736:
URL: https://github.com/apache/camel-spring-boot/pull/1736


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org