fix swig to use java arrays