Scope.allocateArray needs to be more friendly to null or zero-length array

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • None
    • Affects Version/s: repo-panama
    • Component/s: core-libs
    • None

      Scope.allocateArray allows to convert a Java array into a native array, it is possible to have an empty Java array. It would be a burden to developer to make sure the array is not empty for every usage.

      When native call use array, it's typically a pointer and a size. An empty Array usually means pass a null pointer(or any pointer as it's likely be ignored) and size 0.

      It would be nice to have an empty Array with length() returns 0 and elementPoitner() returns Poitner.nullPointer().

            Assignee:
            Henry Jen
            Reporter:
            Henry Jen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: