fix build.xml; improve ArrayUtil