Uploaded image for project: 'Talend Component Kit'
  1. Talend Component Kit
  2. TCOMP-2479

Error message for Min & Max annotation isn't correct

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • All
    • Small

    Description

      It says that the value in the field that is annotated with Min annotation should be greater than the one that is specified. But in fact, it's greater or equal.
      In a similar situation with Max annotation, the check says that the value should be lower or equal to the one that is defined in the annotation, but the error message says just lower.
      https://github.com/Talend/component-runtime/blob/a63271daab9dbadb82b864d70f3580a9e45bd821/component-runtime-manager/src/main/java/org/talend/sdk/component/runtime/manager/reflect/ReflectionService.java#L917-L978

      Example of an error message, that I received during the test of google analytics new UI element that is marked with Min(0) annotation
      But in fact, we can reproduce it with any connectors that has Min or Max annotation

      java.lang.IllegalArgumentException: - Property 'configuration.dataset.datastore.readTimeout' should be > 0, got -1.
      	at org.talend.sdk.component.runtime.manager.reflect.ReflectionService$PayloadValidator.throwIfFailed(ReflectionService.java:1003)
      

      I think we should change the error message. The symbol ">" into ">=". and "<" into "<="

      Attachments

        Activity

          People

            Unassigned Unassigned
            ozhelezniak Oleksandr Zhelezniak
            Oleksandr Zhelezniak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: