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

Record Builder API should work with Object not primitive

Apply templateInsert Lucidchart DiagramXMLWordPrintable

    • All
    • GreenHopper Ranking:
      0|i1wjnv:
    • 9223372036854775807
    • Small

      Record.Builder api work with primitive types :

      withInt(String, int)
      

      As a result, a call builder.withInt("field", null) will compile but throw a NPE.

      it would be better to have

      withInt(String, Integer)
      

      Then, a call builder.with("field", null) will store a null.

      And, for non null value, int is boxed in Integer to be store on a Map .. So, result would be same.

            Unassigned Unassigned
            clesaec Christophe LeSaec
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: