Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15135

camel-spring-boot-generator-maven-plugin is not able to parse default duration value into long field type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.4.0
    • tooling
    • None
    • Unknown

    Description

      If we have the following in the component configuration:

          @UriParam(javaType = "java.time.Duration", defaultValue = "10s")
          private Long writeTimeoutMillis = 100L;
       

      Here the field is long, but the javaType being overiden to java.time.Duration with default value 10s. And then will be converted to Duration in the generated configurer.
      However in the spring boot maven plugin, when it generates the spring boot starter component configuration, the logic is not fully adopted, for example, it will take the default value of 10s and it will assign it to the long type field, e.g:

      private Long writeTimeoutMillis = 10sL;
      

      Which as result it will produce compilation errors.

      Attachments

        Issue Links

          Activity

            People

              gnodet Guillaume Nodet
              omarsmak Omar Al-Safi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: