Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-317

[gwt-jsonix-marshallers] Unbox Java primitives when setting JavaScript array elements

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 0.5.0
    • 0.3.0
    • Authoring Tooling
    • None

      Java kindly boxes primitive types and this is indeed necessary when using primitive types with Java's generics. However when setting an element in a JavaScript array (or Object, map etc) the value remains the object and not a primitive. This means a Java Float is not recognised as a number by the jsonix marshaller and it needs to be unboxed to a float before setting the JavaScript element.

              manstis@redhat.com Michael Anstis
              manstis@redhat.com Michael Anstis
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: