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

Requiredement for date string to be longer than pattern is invalid.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.18.3, 2.19.1
    • Fix Version/s: 2.18.5, 2.19.3, 2.20.0
    • Component/s: camel-bindy
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Came across a bug attempting to parse date fields into a LocalDate using bindy.

      LocalDateTimeFormatFactory.parse(String string) calls "doesStringFitLengthOfPattern(string) which does a string length comparison between the date and the pattern.
      This fails if the pattern includes "X" for timezone and the date string includes "+10:00". Obviously 5 characters is more than 1 character and therefore this date is rejected incorrectly.
      This check should be removed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                acosentino Andrea Cosentino
                Reporter:
                peter.carpenter Peter Carpenter
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: